From 7695a2e0e430e53de4c06c88e14c2fdff09358cd Mon Sep 17 00:00:00 2001 From: Jonathan Hui Date: Tue, 17 Dec 2019 11:50:28 -0800 Subject: [PATCH] [config] rename INITIAL_LOG_LEVEL to LOG_LEVEL_INIT (#4418) --- src/core/common/instance.cpp | 2 +- src/core/config/logging.h | 11 +++++------ src/core/config/openthread-core-config-check.h | 4 ++++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/core/common/instance.cpp b/src/core/common/instance.cpp index 5fdf2fa6a..63c2352c9 100644 --- a/src/core/common/instance.cpp +++ b/src/core/common/instance.cpp @@ -103,7 +103,7 @@ Instance::Instance(void) , mLinkRaw(*this) #endif #if OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE - , mLogLevel(static_cast(OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL)) + , mLogLevel(static_cast(OPENTHREAD_CONFIG_LOG_LEVEL_INIT)) #endif #if OPENTHREAD_ENABLE_VENDOR_EXTENSION , mExtension(Extension::ExtensionBase::Init(*this)) diff --git a/src/core/config/logging.h b/src/core/config/logging.h index 9daad575e..5a2bd8eb5 100644 --- a/src/core/config/logging.h +++ b/src/core/config/logging.h @@ -74,9 +74,8 @@ /** * @def OPENTHREAD_CONFIG_LOG_LEVEL * - * The log level (used at compile time). If `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE` - * is set, this defines the most verbose log level possible. See - *`OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL` to set the initial log level. + * The log level (used at compile time). If `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE` is set, this defines the most + * verbose log level possible. See `OPENTHREAD_CONFIG_LOG_LEVEL_INIT` to set the initial log level. * */ #ifndef OPENTHREAD_CONFIG_LOG_LEVEL @@ -98,13 +97,13 @@ #endif /** - * @def OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL + * @def OPENTHREAD_CONFIG_LOG_LEVEL_INIT * * The initial log level used when OpenThread is initialized. See * `OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE`. */ -#ifndef OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL -#define OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL OPENTHREAD_CONFIG_LOG_LEVEL +#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_INIT +#define OPENTHREAD_CONFIG_LOG_LEVEL_INIT OPENTHREAD_CONFIG_LOG_LEVEL #endif /** diff --git a/src/core/config/openthread-core-config-check.h b/src/core/config/openthread-core-config-check.h index cbceb25b3..c553356b0 100644 --- a/src/core/config/openthread-core-config-check.h +++ b/src/core/config/openthread-core-config-check.h @@ -459,4 +459,8 @@ #error "OPENTHREAD_CONFIG_ENABLE_DYNAMIC_LOG_LEVEL was replaced by OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE." #endif +#ifdef OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL +#error "OPENTHREAD_CONFIG_INITIAL_LOG_LEVEL was replaced by OPENTHREAD_CONFIG_LOG_LEVEL_INIT." +#endif + #endif // OPENTHREAD_CORE_CONFIG_CHECK_H_