[log] implement new logging model with module name support (#7385)

This commit implements new logging model in OpenThread. Each core
module can specify its own module name using `RegisterLogModule()`.
The registered log module name is then included in the all the log
messages emitted from the specific file. This model replaces and
enhances the log region model.
This commit is contained in:
Abtin Keshavarzian
2022-02-17 15:50:45 -08:00
committed by GitHub
parent f759d163dc
commit 564982c818
146 changed files with 2170 additions and 4282 deletions
+1 -1
View File
@@ -33,11 +33,11 @@
#include <openthread-system.h>
#include <openthread/cli.h>
#include <openthread/logging.h>
#include "cli/cli_config.h"
#include "common/code_utils.hpp"
#include "common/debug.hpp"
#include "common/logging.hpp"
#include "utils/uart.h"
#if OPENTHREAD_POSIX
+1 -9
View File
@@ -150,21 +150,13 @@ pseudo_reset:
return 0;
}
/*
* Provide, if required an "otPlatLog()" function
*/
#if OPENTHREAD_CONFIG_LOG_OUTPUT == OPENTHREAD_CONFIG_LOG_OUTPUT_APP
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
{
va_list ap;
va_start(ap, aFormat);
otCliPlatLogv(aLogLevel, aLogRegion, aFormat, ap);
va_end(ap);
}
void otPlatLogLine(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aLogLine)
{
otCliPlatLogLine(aLogLevel, aLogRegion, aLogLine);
}
#endif