esp-idf/components/log/Kconfig.level
2024-05-16 09:26:08 +03:00

91 lines
3.3 KiB
Plaintext

menu "Log Level"
choice LOG_DEFAULT_LEVEL
bool "Default log verbosity"
default LOG_DEFAULT_LEVEL_INFO
help
Specify how much output to see in logs by default.
You can set lower verbosity level at runtime using
esp_log_level_set() function if LOG_DYNAMIC_LEVEL_CONTROL
is enabled.
By default, this setting limits which log statements
are compiled into the program. For example, selecting
"Warning" would mean that changing log level to "Debug"
at runtime will not be possible. To allow increasing log
level above the default at runtime, see the next option.
config LOG_DEFAULT_LEVEL_NONE
bool "No output"
config LOG_DEFAULT_LEVEL_ERROR
bool "Error"
config LOG_DEFAULT_LEVEL_WARN
bool "Warning"
config LOG_DEFAULT_LEVEL_INFO
bool "Info"
config LOG_DEFAULT_LEVEL_DEBUG
bool "Debug"
config LOG_DEFAULT_LEVEL_VERBOSE
bool "Verbose"
endchoice
config LOG_DEFAULT_LEVEL
int
default 0 if LOG_DEFAULT_LEVEL_NONE
default 1 if LOG_DEFAULT_LEVEL_ERROR
default 2 if LOG_DEFAULT_LEVEL_WARN
default 3 if LOG_DEFAULT_LEVEL_INFO
default 4 if LOG_DEFAULT_LEVEL_DEBUG
default 5 if LOG_DEFAULT_LEVEL_VERBOSE
choice LOG_MAXIMUM_LEVEL
bool "Maximum log verbosity"
default LOG_MAXIMUM_EQUALS_DEFAULT
help
This config option sets the highest log verbosity that it's possible to select
at runtime by calling esp_log_level_set(). This level may be higher than
the default verbosity level which is set when the app starts up.
This can be used enable debugging output only at a critical point, for a particular
tag, or to minimize startup time but then enable more logs once the firmware has
loaded.
Note that increasing the maximum available log level will increase the firmware
binary size.
This option only applies to logging from the app, the bootloader log level is
fixed at compile time to the separate "Bootloader log verbosity" setting.
config LOG_MAXIMUM_EQUALS_DEFAULT
bool "Same as default"
config LOG_MAXIMUM_LEVEL_ERROR
bool "Error"
depends on LOG_DEFAULT_LEVEL < 1
config LOG_MAXIMUM_LEVEL_WARN
bool "Warning"
depends on LOG_DEFAULT_LEVEL < 2
config LOG_MAXIMUM_LEVEL_INFO
bool "Info"
depends on LOG_DEFAULT_LEVEL < 3
config LOG_MAXIMUM_LEVEL_DEBUG
bool "Debug"
depends on LOG_DEFAULT_LEVEL < 4
config LOG_MAXIMUM_LEVEL_VERBOSE
bool "Verbose"
depends on LOG_DEFAULT_LEVEL < 5
endchoice
config LOG_MAXIMUM_LEVEL
int
default LOG_DEFAULT_LEVEL if LOG_MAXIMUM_EQUALS_DEFAULT
default 0 if LOG_MAXIMUM_LEVEL_NONE
default 1 if LOG_MAXIMUM_LEVEL_ERROR
default 2 if LOG_MAXIMUM_LEVEL_WARN
default 3 if LOG_MAXIMUM_LEVEL_INFO
default 4 if LOG_MAXIMUM_LEVEL_DEBUG
default 5 if LOG_MAXIMUM_LEVEL_VERBOSE
orsource "./Kconfig.level_settings"
endmenu