Skip to content

Commit 637f0e6

Browse files
Marek Matejradimkarnis
authored andcommitted
fix(elf2image): Fix incorrect logger call
Replace the non-existing `log.info` call by the `log.note` and update the docs accordingly. Signed-off-by: Marek Matej <[email protected]>
1 parent 785a3db commit 637f0e6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/en/esptool/scripting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,4 +354,4 @@ To ensure compatibility with esptool, the custom logger should re-implement (or
354354
:members: print, note, warning, error, stage, progress_bar, set_verbosity
355355
:member-order: bysource
356356

357-
These methods are essential for maintaining proper integration and behavior with esptool. Additionally, all output printing should be made using ``log.print()`` (or the respective method, such as ``log.info()`` or ``log.warning()``) instead of the standard ``print()`` function to ensure the output is routed through the custom logger. This ensures consistency and allows the custom logger to handle all output appropriately. You can further customize this logger to fit your application's needs, such as integrating with GUI components or advanced logging frameworks.
357+
These methods are essential for maintaining proper integration and behavior with esptool. Additionally, all output printing should be made using ``log.print()`` (or the respective method, such as ``log.note()`` or ``log.warning()``) instead of the standard ``print()`` function to ensure the output is routed through the custom logger. This ensures consistency and allows the custom logger to handle all output appropriately. You can further customize this logger to fit your application's needs, such as integrating with GUI components or advanced logging frameworks.

docs/en/migration-guide.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ The esptool ``v5`` release introduces a centralized logging mechanism to improve
7777

7878
**Migration Steps:**
7979

80-
1. If your scripts rely on direct ``print()`` statements, update them to use the centralized logger for consistent output. Calls to the logger should be made using ``log.print()`` (or the respective method, such as ``log.info()``, ``log.warning()``, or ``log.error()``).
80+
1. If your scripts rely on direct ``print()`` statements, update them to use the centralized logger for consistent output. Calls to the logger should be made using ``log.print()`` (or the respective method, such as ``log.note()``, ``log.warning()``, or ``log.error()``).
8181
2. Refer to the provided documentation to implement custom loggers as needed.
8282
3. Update GUIs or tools to leverage the progress tracking API for better user feedback during lengthy operations.
8383

esptool/bin_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ def merge_adjacent_segments(self):
443443
elem_pad_addr != elem.addr + len(elem.data)
444444
and elem_pad_addr == next_elem.addr
445445
):
446-
log.info(
446+
log.note(
447447
"Inserting {} bytes padding between {} and {}".format(
448448
next_elem.addr - (elem.addr + len(elem.data)),
449449
elem.name,

0 commit comments

Comments
 (0)