From d78adb669b2345880ff79fff244df2d5cb6b6d57 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk Date: Thu, 30 Dec 2021 13:38:58 +0100 Subject: [PATCH] [zephyr] Added Kconfig options to control Matter logs level 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. --- config/zephyr/Kconfig | 4 ++++ src/platform/Zephyr/Logging.cpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index b3404c5ef3de08..a390f78b429527 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -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 diff --git a/src/platform/Zephyr/Logging.cpp b/src/platform/Zephyr/Logging.cpp index f2bb80877e4d5a..017ed0f478313c 100644 --- a/src/platform/Zephyr/Logging.cpp +++ b/src/platform/Zephyr/Logging.cpp @@ -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 {