From db707fbf3451bf3d9e07058a48df5defb4c33ed0 Mon Sep 17 00:00:00 2001 From: Ciaran Woodward Date: Fri, 15 Sep 2017 02:35:38 +0100 Subject: [PATCH] [log] Fix otLog*Cli using the CoAP log region (#2194) --- src/core/common/logging.hpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/common/logging.hpp b/src/core/common/logging.hpp index 1fb433796..8af62d85a 100644 --- a/src/core/common/logging.hpp +++ b/src/core/common/logging.hpp @@ -742,7 +742,7 @@ extern "C" { /** * @def otLogCritCli * - * This method generates a log with level critical for the CoAP region. + * This method generates a log with level critical for the CLI region. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aFormat A pointer to the format string. @@ -753,7 +753,7 @@ extern "C" { /** * @def otLogWarnCli * - * This method generates a log with level warning for the CoAP region. + * This method generates a log with level warning for the CLI region. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aFormat A pointer to the format string. @@ -764,7 +764,7 @@ extern "C" { /** * @def otLogInfoCli * - * This method generates a log with level info for the CoAP region. + * This method generates a log with level info for the CLI region. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aFormat A pointer to the format string. @@ -775,7 +775,7 @@ extern "C" { /** * @def otLogDebgCli * - * This method generates a log with level debug for the CoAP region. + * This method generates a log with level debug for the CLI region. * * @param[in] aInstance A reference to the OpenThread instance. * @param[in] aFormat A pointer to the format string. @@ -783,12 +783,12 @@ extern "C" { * */ #if OPENTHREAD_CONFIG_LOG_CLI == 1 -#define otLogCritCli(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) -#define otLogWarnCli(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) -#define otLogInfoCli(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) +#define otLogCritCli(aInstance, aFormat, ...) otLogCrit(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) +#define otLogWarnCli(aInstance, aFormat, ...) otLogWarn(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) +#define otLogInfoCli(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) #define otLogInfoCliErr(aInstance, aError, aFormat, ...) \ - otLogInfo(&aInstance, OT_LOG_REGION_COAP, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__) -#define otLogDebgCli(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__) + otLogInfo(&aInstance, OT_LOG_REGION_CLI, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__) +#define otLogDebgCli(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__) #else #define otLogCritCli(aInstance, aFormat, ...) #define otLogWarnCli(aInstance, aFormat, ...)