Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32] Backport the set default log level to CHIP Logs to v1.3-branch. #35532

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ if (CONFIG_CHIP_CONFIG_IM_PRETTY_PRINT)
endif()

# Config the chip log level by IDF menuconfig
if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 1)
chip_gn_arg_bool ("chip_error_logging" "true")
else()
chip_gn_arg_bool ("chip_error_logging" "false")
endif()

if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 3)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 3)
chip_gn_arg_bool ("chip_progress_logging" "true")
else()
chip_gn_arg_bool ("chip_progress_logging" "false")
endif()

if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 4)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 4)
chip_gn_arg_bool ("chip_detail_logging" "true")
else()
chip_gn_arg_bool ("chip_detail_logging" "false")
endif()

if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 5)
if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 5)
chip_gn_arg_bool ("chip_automation_logging" "true")
else()
chip_gn_arg_bool ("chip_automation_logging" "false")
Expand Down
30 changes: 30 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1117,6 +1117,36 @@ menu "CHIP Device Layer"
To see detailed logging please set default log level to Debug.
(Component config --> Log output --> Default log verbosity --> Debug)

choice CHIP_LOG_DEFAULT_LEVEL
bool "CHIP default log verbosity"
default CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL
help
Default log level for CHIP logs. Note that CHIP_LOG_DEFAULT_LEVEL can only be less than or equal to LOG_DEFAULT_LEVEL.

config CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL
bool "Same as default log level"
config CHIP_LOG_DEFAULT_LEVEL_NONE
bool "CHIP logging disabled"
config CHIP_LOG_DEFAULT_LEVEL_ERROR
bool "Enable Error Logs"
config CHIP_LOG_DEFAULT_LEVEL_PROGRESS
bool "Enable Progress Logs"
config CHIP_LOG_DEFAULT_LEVEL_DETAIL
bool "Enable Detail Logs"
config CHIP_LOG_DEFAULT_LEVEL_AUTOMATION
bool "Enable Automation Logs"
endchoice

config CHIP_LOG_DEFAULT_LEVEL
int
range 0 LOG_DEFAULT_LEVEL
default LOG_DEFAULT_LEVEL if CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL
default 0 if CHIP_LOG_DEFAULT_LEVEL_NONE
default 1 if CHIP_LOG_DEFAULT_LEVEL_ERROR
default 3 if CHIP_LOG_DEFAULT_LEVEL_PROGRESS
default 4 if CHIP_LOG_DEFAULT_LEVEL_DETAIL
default 5 if CHIP_LOG_DEFAULT_LEVEL_AUTOMATION

endmenu

config CHIP_ENABLE_BDX_LOG_TRANSFER
Expand Down
Loading