mirror of
https://github.com/espressif/openthread.git
synced 2026-10-18 21:48:12 +00:00
[log] Fix otLog*Cli using the CoAP log region (#2194)
This commit is contained in:
committed by
Jonathan Hui
parent
1c02bc79b7
commit
db707fbf34
@@ -742,7 +742,7 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @def otLogCritCli
|
* @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] aInstance A reference to the OpenThread instance.
|
||||||
* @param[in] aFormat A pointer to the format string.
|
* @param[in] aFormat A pointer to the format string.
|
||||||
@@ -753,7 +753,7 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @def otLogWarnCli
|
* @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] aInstance A reference to the OpenThread instance.
|
||||||
* @param[in] aFormat A pointer to the format string.
|
* @param[in] aFormat A pointer to the format string.
|
||||||
@@ -764,7 +764,7 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @def otLogInfoCli
|
* @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] aInstance A reference to the OpenThread instance.
|
||||||
* @param[in] aFormat A pointer to the format string.
|
* @param[in] aFormat A pointer to the format string.
|
||||||
@@ -775,7 +775,7 @@ extern "C" {
|
|||||||
/**
|
/**
|
||||||
* @def otLogDebgCli
|
* @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] aInstance A reference to the OpenThread instance.
|
||||||
* @param[in] aFormat A pointer to the format string.
|
* @param[in] aFormat A pointer to the format string.
|
||||||
@@ -783,12 +783,12 @@ extern "C" {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#if OPENTHREAD_CONFIG_LOG_CLI == 1
|
#if OPENTHREAD_CONFIG_LOG_CLI == 1
|
||||||
#define otLogCritCli(aInstance, aFormat, ...) otLogCrit(&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_COAP, 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_COAP, aFormat, ## __VA_ARGS__)
|
#define otLogInfoCli(aInstance, aFormat, ...) otLogInfo(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__)
|
||||||
#define otLogInfoCliErr(aInstance, aError, aFormat, ...) \
|
#define otLogInfoCliErr(aInstance, aError, aFormat, ...) \
|
||||||
otLogInfo(&aInstance, OT_LOG_REGION_COAP, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__)
|
otLogInfo(&aInstance, OT_LOG_REGION_CLI, "Error %s: " aFormat, otThreadErrorToString(aError), ## __VA_ARGS__)
|
||||||
#define otLogDebgCli(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_COAP, aFormat, ## __VA_ARGS__)
|
#define otLogDebgCli(aInstance, aFormat, ...) otLogDebg(&aInstance, OT_LOG_REGION_CLI, aFormat, ## __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define otLogCritCli(aInstance, aFormat, ...)
|
#define otLogCritCli(aInstance, aFormat, ...)
|
||||||
#define otLogWarnCli(aInstance, aFormat, ...)
|
#define otLogWarnCli(aInstance, aFormat, ...)
|
||||||
|
|||||||
Reference in New Issue
Block a user