You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Replace the default logger with the custom logger
324
332
log.set_logger(CustomLogger())
325
333
@@ -334,11 +342,11 @@ To ensure compatibility with esptool, the custom logger should re-implement (or
334
342
- ``note``: Logs informational messages.
335
343
- ``warning``: Logs warning messages.
336
344
- ``error``: Logs error messages.
337
-
- ``print_overwrite``: Handles message overwriting (can be a simple ``print()`` if overwriting is not needed).
338
-
- ``set_progress``: Handles percentage updates of long-running operations - ``write-flash``, ``read-flash``, and ``dump-mem`` (useful for GUI visualisation, e.g. as a progress bar).
345
+
- ``stage``: Starts or ends a collapsible output stage.
These methods are essential for maintaining proper integration and behavior with esptool. Additionally, all calls to the logger 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.
352
+
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.
0 commit comments