Skip to content

Commit

Permalink
[zephyr] Added Kconfig options to control Matter logs level (#13288)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kkasperczyk-no authored and pull[bot] committed Oct 27, 2023
1 parent bd59541 commit 1416144
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/nrfconnect/app/sample-defaults.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ CONFIG_STD_CPP14=y

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y
CONFIG_MATTER_LOG_LEVEL_DBG=y
CONFIG_PRINTK_SYNC=y
CONFIG_ASSERT=y
CONFIG_HW_STACK_PROTECTION=y
Expand Down
4 changes: 4 additions & 0 deletions config/zephyr/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,8 @@ config APP_LINK_WITH_CHIP
Add Connected Home over IP header files to the 'app' include path
and link the 'app' with Connected Home over IP libraries.

module = MATTER
module-str = Matter
source "${ZEPHYR_BASE}/subsys/logging/Kconfig.template.log_config"

endif
2 changes: 1 addition & 1 deletion src/platform/Zephyr/Logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define LOG_MESSAGE(msg) (msg)
#endif

LOG_MODULE_REGISTER(chip, LOG_LEVEL_DBG);
LOG_MODULE_REGISTER(chip, CONFIG_MATTER_LOG_LEVEL);

namespace chip {
namespace DeviceLayer {
Expand Down

0 comments on commit 1416144

Please sign in to comment.