From 37b3d9f628aa16f01e0e11dbb4f3eb3de9bc4be4 Mon Sep 17 00:00:00 2001 From: kangping Date: Wed, 11 Aug 2021 09:24:20 +0800 Subject: [PATCH] [posix] set compile-time minimum log level to debug (#6905) The compile-time log level definition is the lowest log level that can be set by `otLoggingSetLevel`. This is useful for dumping more logs for testing. --- .../platform/openthread-core-posix-config.h | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/posix/platform/openthread-core-posix-config.h b/src/posix/platform/openthread-core-posix-config.h index 16dd0a3b3..35c13a74a 100644 --- a/src/posix/platform/openthread-core-posix-config.h +++ b/src/posix/platform/openthread-core-posix-config.h @@ -64,6 +64,27 @@ #define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED #endif +/** + * @def OPENTHREAD_CONFIG_LOG_LEVEL + * + * Define the compile-time log level which is the lowest log level + * that can be set at run-time by `otLoggingSetLevel`. + * + */ +#ifndef OPENTHREAD_CONFIG_LOG_LEVEL +#define OPENTHREAD_CONFIG_LOG_LEVEL OT_LOG_LEVEL_DEBG +#endif + +/** + * @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_LOG_LEVEL_INIT +#define OPENTHREAD_CONFIG_LOG_LEVEL_INIT OT_LOG_LEVEL_CRIT +#endif + /** * @def OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE *