[log] Fix otLog*Cli using the CoAP log region (#2194)

This commit is contained in:
Ciaran Woodward
2017-09-14 18:35:38 -07:00
committed by Jonathan Hui
parent 1c02bc79b7
commit db707fbf34
+9 -9
View File
@@ -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, ...)