@@ -3,10 +3,23 @@ menu "Format"
33 config LOG_COLORS
44 bool "Color"
55 default n
6+ select LOG_COLORS_SUPPORT if LOG_VERSION_2
67 help
7- Enable ANSI terminal color codes.
8+ Enable ANSI terminal color codes. Logs (info, errors, warnings) will contain color codes.
89 In order to view these, your terminal program must support ANSI color codes.
910
11+ config LOG_COLORS_SUPPORT
12+ bool "Allow enabling color output at run time"
13+ depends on LOG_VERSION_2
14+ default n
15+ help
16+ Enables support for color codes in the esp_log() function. If CONFIG_LOG_COLORS is enabled, this option
17+ is always active. If CONFIG_LOG_COLORS is disabled, this option allows you to still handle color codes
18+ in specific files by defining ESP_LOG_COLOR_DISABLED as 0 before including esp_log.h.
19+
20+ Note that enabling this option may slightly increase IRAM usage due to additional color handling
21+ functionality. It provides flexibility to manage color output even when CONFIG_LOG_COLORS is turned off.
22+
1023 choice LOG_TIMESTAMP_SOURCE
1124 prompt "Timestamp"
1225 default LOG_TIMESTAMP_SOURCE_RTOS
@@ -33,24 +46,49 @@ menu "Format"
3346 - "System time (YY-MM-DD HH:MM:SS.sss)" it is the same as the above,
3447 but also prints the date as well.
3548
49+ - "Unix time in milliseconds" is the same as the two above,
50+ but in Unix time format and in milliseconds.
51+ e.g. (1718795571035).
52+
3653 - NOTE: Currently this will not get used in logging from binary blobs
3754 (i.e WiFi & Bluetooth libraries), these will always print
3855 milliseconds since boot.
3956
4057 config LOG_TIMESTAMP_SOURCE_NONE
4158 bool "None"
42- depends on NO_SYMBOL # hide it now, turn it on final MR
59+ depends on LOG_VERSION_2
4360
4461 config LOG_TIMESTAMP_SOURCE_RTOS
4562 bool "Milliseconds Since Boot"
63+ select LOG_TIMESTAMP_SUPPORT if LOG_VERSION_2
4664
4765 config LOG_TIMESTAMP_SOURCE_SYSTEM
4866 bool "System Time (HH:MM:SS.sss)"
67+ select LOG_TIMESTAMP_SUPPORT if LOG_VERSION_2
4968
5069 config LOG_TIMESTAMP_SOURCE_SYSTEM_FULL
5170 bool "System Time (YY-MM-DD HH:MM:SS.sss)"
52- depends on NO_SYMBOL # hide it now, turn it on final MR
71+ select LOG_TIMESTAMP_SUPPORT if LOG_VERSION_2
72+ depends on LOG_VERSION_2
73+
74+ config LOG_TIMESTAMP_SOURCE_UNIX
75+ bool "Unix time in milliseconds"
76+ select LOG_TIMESTAMP_SUPPORT if LOG_VERSION_2
77+ depends on LOG_VERSION_2
5378
5479 endchoice # LOG_TIMESTAMP_SOURCE
5580
81+ config LOG_TIMESTAMP_SUPPORT
82+ bool "Allow enabling timestamp output at run time"
83+ depends on LOG_VERSION_2
84+ default y
85+ help
86+ Enables support for timestamp in the esp_log() function.
87+ If CONFIG_LOG_TIMESTAMP_SOURCE_NONE, this option allows you to still handle timestamp
88+ in specific files by defining ESP_LOG_TIMESTAMP_DISABLED as 0 before including esp_log.h.
89+
90+ Note that enabling this option may slightly increase IRAM usage due to additional timestamp handling
91+ functionality. It provides flexibility to manage timestamp output even when
92+ CONFIG_LOG_TIMESTAMP_SOURCE_NONE.
93+
5694endmenu
0 commit comments