From 007ae938c1b0118eaa8bb04f82f9787cbe508567 Mon Sep 17 00:00:00 2001 From: Peter Dragun Date: Fri, 14 Nov 2025 15:23:23 +0100 Subject: [PATCH] docs: Add note about automatic log coloring in IDF Monitor --- docs/en/api-reference/system/log.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/en/api-reference/system/log.rst b/docs/en/api-reference/system/log.rst index aa5b50b2df0..68d044bc832 100644 --- a/docs/en/api-reference/system/log.rst +++ b/docs/en/api-reference/system/log.rst @@ -194,6 +194,12 @@ The logging system supports the following formatting options, applicable for bot - For **Log V2**, the :ref:`CONFIG_LOG_COLORS_SUPPORT` option enables runtime support for adding color output to specific logs, files, or components, even if global color is disabled. To enable color for a specific context use ``ESP_LOG_COLOR_DISABLED``. + .. note:: + + Please note that IDF Monitor expects the format described above of log messages to automatically color logs. The minimal required format is log level name followed by timestamp. A newline marks the end of the log message. E.g., ``I (56): Log message\n`` + If this format is not followed, for example by disabling the timestamp, then automatic log coloring will not work. In such situations, it is recommended to enable :ref:`CONFIG_LOG_COLORS` in the menuconfig. + Another related restriction is for multi-line logs where only the first line will be colored correctly. + - **Level Name**: A single letter (I, W, E, D, V) indicating log verbosity, displayed at the start of each message. Useful for identifying log levels, especially when color is disabled, as utilized by the ESP-IDF monitor tool. - **Timestamp**: Adds a timestamp to log messages globally. Controlled by :ref:`CONFIG_LOG_TIMESTAMP_SOURCE`.