From 230884053c6fe2cf35fda5367780e2e7e13e96f1 Mon Sep 17 00:00:00 2001 From: Kamil Kasperczyk <66371704+kkasperczyk-no@users.noreply.github.com> Date: Thu, 31 Mar 2022 14:48:46 +0200 Subject: [PATCH] [nrfconnect] Fixed logs configuration. (#16872) Default log level for Zephyr logger modules was changed to warning and application logs using Zephyr logger directly disappeared. Added CONFIG_MATTER_LOG_LEVEL for application log modules. --- examples/all-clusters-app/nrfconnect/main/AppTask.cpp | 2 +- examples/all-clusters-app/nrfconnect/main/main.cpp | 2 +- examples/light-switch-app/nrfconnect/main/AppTask.cpp | 2 +- examples/light-switch-app/nrfconnect/main/BindingHandler.cpp | 2 +- examples/light-switch-app/nrfconnect/main/main.cpp | 2 +- examples/lighting-app/nrfconnect/main/AppTask.cpp | 2 +- examples/lighting-app/nrfconnect/main/LightingManager.cpp | 2 +- examples/lighting-app/nrfconnect/main/main.cpp | 2 +- examples/lock-app/nrfconnect/main/AppTask.cpp | 2 +- examples/lock-app/nrfconnect/main/BoltLockManager.cpp | 2 +- examples/lock-app/nrfconnect/main/main.cpp | 2 +- examples/pigweed-app/nrfconnect/main/main.cpp | 2 +- examples/platform/nrfconnect/Rpc.cpp | 2 +- examples/pump-app/nrfconnect/main/AppTask.cpp | 2 +- examples/pump-app/nrfconnect/main/PumpManager.cpp | 2 +- examples/pump-app/nrfconnect/main/main.cpp | 2 +- examples/pump-controller-app/nrfconnect/main/AppTask.cpp | 2 +- examples/pump-controller-app/nrfconnect/main/PumpManager.cpp | 2 +- examples/pump-controller-app/nrfconnect/main/main.cpp | 2 +- src/test_driver/nrfconnect/main/runner.cpp | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 2cc10a47512849..2ab79a37edd143 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -45,7 +45,7 @@ #define BUTTON_PUSH_EVENT 1 #define BUTTON_RELEASE_EVENT 0 -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), APP_EVENT_QUEUE_SIZE, alignof(AppEvent)); static LEDWidget sStatusLED; diff --git a/examples/all-clusters-app/nrfconnect/main/main.cpp b/examples/all-clusters-app/nrfconnect/main/main.cpp index 3e3f506d66d1f7..bb67947911cad1 100644 --- a/examples/all-clusters-app/nrfconnect/main/main.cpp +++ b/examples/all-clusters-app/nrfconnect/main/main.cpp @@ -19,7 +19,7 @@ #include -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; diff --git a/examples/light-switch-app/nrfconnect/main/AppTask.cpp b/examples/light-switch-app/nrfconnect/main/AppTask.cpp index 3051abf2c03a32..40839ba477913b 100644 --- a/examples/light-switch-app/nrfconnect/main/AppTask.cpp +++ b/examples/light-switch-app/nrfconnect/main/AppTask.cpp @@ -47,7 +47,7 @@ using namespace ::chip::app; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); namespace { constexpr EndpointId kLightSwitchEndpointId = 1; constexpr EndpointId kLightEndpointId = 1; diff --git a/examples/light-switch-app/nrfconnect/main/BindingHandler.cpp b/examples/light-switch-app/nrfconnect/main/BindingHandler.cpp index ad1563c7dcc1db..78e562525a2d26 100644 --- a/examples/light-switch-app/nrfconnect/main/BindingHandler.cpp +++ b/examples/light-switch-app/nrfconnect/main/BindingHandler.cpp @@ -22,7 +22,7 @@ #endif #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); using namespace chip; using namespace chip::app; diff --git a/examples/light-switch-app/nrfconnect/main/main.cpp b/examples/light-switch-app/nrfconnect/main/main.cpp index 68db7f7f258fa8..87098ff4b3e5d3 100644 --- a/examples/light-switch-app/nrfconnect/main/main.cpp +++ b/examples/light-switch-app/nrfconnect/main/main.cpp @@ -20,7 +20,7 @@ #include -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index a05cca313beb5b..ccc46f3db56404 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -47,7 +47,7 @@ #include #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; using namespace ::chip::app; diff --git a/examples/lighting-app/nrfconnect/main/LightingManager.cpp b/examples/lighting-app/nrfconnect/main/LightingManager.cpp index 652901a5fa0055..3fdd428db53815 100644 --- a/examples/lighting-app/nrfconnect/main/LightingManager.cpp +++ b/examples/lighting-app/nrfconnect/main/LightingManager.cpp @@ -26,7 +26,7 @@ #include #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); LightingManager LightingManager::sLight; diff --git a/examples/lighting-app/nrfconnect/main/main.cpp b/examples/lighting-app/nrfconnect/main/main.cpp index 04afe27bd8dd53..1e9668b977bcd8 100644 --- a/examples/lighting-app/nrfconnect/main/main.cpp +++ b/examples/lighting-app/nrfconnect/main/main.cpp @@ -30,7 +30,7 @@ #include #endif -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index 42219b1dcffb07..64b8856bbc94f7 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -57,7 +57,7 @@ using namespace ::chip::DeviceLayer; namespace { constexpr EndpointId kLockEndpointId = 1; -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), APP_EVENT_QUEUE_SIZE, alignof(AppEvent)); k_timer sFunctionTimer; diff --git a/examples/lock-app/nrfconnect/main/BoltLockManager.cpp b/examples/lock-app/nrfconnect/main/BoltLockManager.cpp index c72e98ea3e4d34..73d3d447b417eb 100644 --- a/examples/lock-app/nrfconnect/main/BoltLockManager.cpp +++ b/examples/lock-app/nrfconnect/main/BoltLockManager.cpp @@ -25,7 +25,7 @@ #include #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); static k_timer sLockTimer; diff --git a/examples/lock-app/nrfconnect/main/main.cpp b/examples/lock-app/nrfconnect/main/main.cpp index e1c0c6467e027e..1867a549b5b005 100644 --- a/examples/lock-app/nrfconnect/main/main.cpp +++ b/examples/lock-app/nrfconnect/main/main.cpp @@ -21,7 +21,7 @@ #include -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; diff --git a/examples/pigweed-app/nrfconnect/main/main.cpp b/examples/pigweed-app/nrfconnect/main/main.cpp index 29947a8fef1959..e74b61652641f2 100644 --- a/examples/pigweed-app/nrfconnect/main/main.cpp +++ b/examples/pigweed-app/nrfconnect/main/main.cpp @@ -28,7 +28,7 @@ #include #include -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); namespace { LEDWidget sStatusLED; diff --git a/examples/platform/nrfconnect/Rpc.cpp b/examples/platform/nrfconnect/Rpc.cpp index 001395a93211be..8fa4fa7c864681 100644 --- a/examples/platform/nrfconnect/Rpc.cpp +++ b/examples/platform/nrfconnect/Rpc.cpp @@ -23,7 +23,7 @@ #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); #if defined(PW_RPC_ATTRIBUTE_SERVICE) && PW_RPC_ATTRIBUTE_SERVICE #include "pigweed/rpc_services/Attributes.h" diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 8321807aeed371..44b812aab274d8 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -60,7 +60,7 @@ using namespace ::chip::DeviceLayer; namespace { -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), APP_EVENT_QUEUE_SIZE, alignof(AppEvent)); k_timer sFunctionTimer; diff --git a/examples/pump-app/nrfconnect/main/PumpManager.cpp b/examples/pump-app/nrfconnect/main/PumpManager.cpp index 274ef8ff812886..0e13b861c23eca 100644 --- a/examples/pump-app/nrfconnect/main/PumpManager.cpp +++ b/examples/pump-app/nrfconnect/main/PumpManager.cpp @@ -25,7 +25,7 @@ #include #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); static k_timer sStartTimer; diff --git a/examples/pump-app/nrfconnect/main/main.cpp b/examples/pump-app/nrfconnect/main/main.cpp index e1c0c6467e027e..1867a549b5b005 100644 --- a/examples/pump-app/nrfconnect/main/main.cpp +++ b/examples/pump-app/nrfconnect/main/main.cpp @@ -21,7 +21,7 @@ #include -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index e3d7148dfac823..66c56d7eaca2a1 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -57,7 +57,7 @@ using namespace ::chip::DeviceLayer; namespace { -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); K_MSGQ_DEFINE(sAppEventQueue, sizeof(AppEvent), APP_EVENT_QUEUE_SIZE, alignof(AppEvent)); k_timer sFunctionTimer; diff --git a/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp b/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp index 7e0c9482305df9..c61a2a4a56e4aa 100644 --- a/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp +++ b/examples/pump-controller-app/nrfconnect/main/PumpManager.cpp @@ -25,7 +25,7 @@ #include #include -LOG_MODULE_DECLARE(app); +LOG_MODULE_DECLARE(app, CONFIG_MATTER_LOG_LEVEL); static k_timer sStartTimer; diff --git a/examples/pump-controller-app/nrfconnect/main/main.cpp b/examples/pump-controller-app/nrfconnect/main/main.cpp index e1c0c6467e027e..1867a549b5b005 100644 --- a/examples/pump-controller-app/nrfconnect/main/main.cpp +++ b/examples/pump-controller-app/nrfconnect/main/main.cpp @@ -21,7 +21,7 @@ #include -LOG_MODULE_REGISTER(app); +LOG_MODULE_REGISTER(app, CONFIG_MATTER_LOG_LEVEL); using namespace ::chip; diff --git a/src/test_driver/nrfconnect/main/runner.cpp b/src/test_driver/nrfconnect/main/runner.cpp index 8f87f072e37115..dc2f697a020a61 100644 --- a/src/test_driver/nrfconnect/main/runner.cpp +++ b/src/test_driver/nrfconnect/main/runner.cpp @@ -26,7 +26,7 @@ using namespace ::chip; using namespace ::chip::DeviceLayer; -LOG_MODULE_REGISTER(runner); +LOG_MODULE_REGISTER(runner, CONFIG_MATTER_LOG_LEVEL); void main(void) {