diff --git a/src/core/coap/coap.cpp b/src/core/coap/coap.cpp index e84ffabb7..67a3cf4ab 100644 --- a/src/core/coap/coap.cpp +++ b/src/core/coap/coap.cpp @@ -604,7 +604,7 @@ exit: if (error != OT_ERROR_NONE) { - otLogInfoCoapErr(error, "Failed to process request"); + otLogInfoCoap("Failed to process request: %s", otThreadErrorToString(error)); if (error == OT_ERROR_NOT_FOUND && !aMessageInfo.GetSockAddr().IsMulticast()) { diff --git a/src/core/common/logging.hpp b/src/core/common/logging.hpp index 5efdbbb57..0f03854ba 100644 --- a/src/core/common/logging.hpp +++ b/src/core/common/logging.hpp @@ -1129,16 +1129,12 @@ extern "C" { #define otLogWarnCoap(aFormat, ...) otLogWarn(OT_LOG_REGION_COAP, _OT_REGION_COAP_PREFIX aFormat, ##__VA_ARGS__) #define otLogNoteCoap(aFormat, ...) otLogNote(OT_LOG_REGION_COAP, _OT_REGION_COAP_PREFIX aFormat, ##__VA_ARGS__) #define otLogInfoCoap(aFormat, ...) otLogInfo(OT_LOG_REGION_COAP, _OT_REGION_COAP_PREFIX aFormat, ##__VA_ARGS__) -#define otLogInfoCoapErr(aError, aFormat, ...) \ - otLogInfo(OT_LOG_REGION_COAP, _OT_REGION_COAP_PREFIX "Error %s: " aFormat, otThreadErrorToString(aError), \ - ##__VA_ARGS__) #define otLogDebgCoap(aFormat, ...) otLogDebg(OT_LOG_REGION_COAP, _OT_REGION_COAP_PREFIX aFormat, ##__VA_ARGS__) #else #define otLogCritCoap(aFormat, ...) #define otLogWarnCoap(aFormat, ...) #define otLogNoteCoap(aFormat, ...) #define otLogInfoCoap(aFormat, ...) -#define otLogInfoCoapErr(aError, aFormat, ...) #define otLogDebgCoap(aFormat, ...) #endif