Skip to content

Commit 65ba5df

Browse files
[zephyr] Added Kconfig options to control Matter logs level (project-chip#13288)
Zephyr logging platform currently uses hardcoded DEBUG log level and it's not possible to change it through KConfig options. Added MATTER logging module to Zephyr subsys and enabled setting Matter logs level using CONFIG_MATTER_LOG_LEVEL option.
1 parent 6ca16f0 commit 65ba5df

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

config/nrfconnect/app/sample-defaults.conf

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ CONFIG_STD_CPP14=y
2020

2121
CONFIG_LOG=y
2222
CONFIG_LOG_MODE_MINIMAL=y
23+
CONFIG_MATTER_LOG_LEVEL_DBG=y
2324
CONFIG_PRINTK_SYNC=y
2425
CONFIG_ASSERT=y
2526
CONFIG_HW_STACK_PROTECTION=y

config/zephyr/Kconfig

+4
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,8 @@ config APP_LINK_WITH_CHIP
125125
Add Connected Home over IP header files to the 'app' include path
126126
and link the 'app' with Connected Home over IP libraries.
127127

128+
module = MATTER
129+
module-str = Matter
130+
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"
131+
128132
endif

src/platform/Zephyr/Logging.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define LOG_MESSAGE(msg) (msg)
1919
#endif
2020

21-
LOG_MODULE_REGISTER(chip, LOG_LEVEL_DBG);
21+
LOG_MODULE_REGISTER(chip, CONFIG_MATTER_LOG_LEVEL);
2222

2323
namespace chip {
2424
namespace DeviceLayer {

0 commit comments

Comments
 (0)