Logging
This module includes the platform abstraction for the debug log service.
Summary
Enumerations |
|
---|---|
otLogRegion{
|
enum This enumeration represents log regions. |
Typedefs |
|
---|---|
otLogLevel
|
typedefint
This type represents the log level. |
otLogRegion
|
typedefenum otLogRegion
This enumeration represents log regions. |
Functions |
|
---|---|
otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
|
void
This function outputs logs.
|
otPlatLogLine(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aLogLine)
|
void
This (optional) platform function outputs a prepared log line.
|
Enumerations
otLogRegion
otLogRegion
This enumeration represents log regions.
Typedefs
otLogLevel
int otLogLevel
This type represents the log level.
Functions
otPlatLog
void otPlatLog( otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ... )
This function outputs logs.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
otPlatLogLine
void otPlatLogLine( otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aLogLine )
This (optional) platform function outputs a prepared log line.
This platform function is used by OpenThread core when OPENTHREAD_CONFIG_LOG_DEFINE_AS_MACRO_ONLY
is not enabled (in this case, the OT core itself will prepare a full log line).
Note that this function is optional and if not provided by platform layer, a default (weak) implementation is provided and used by OpenThread core as otPlatLog(aLogLevel, aLogResion, "%s", aLogLine)
.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
Macros
OT_LOG_LEVEL_CRIT
OT_LOG_LEVEL_CRIT 1
Log level Critical.
OT_LOG_LEVEL_DEBG
OT_LOG_LEVEL_DEBG 5
Log level Debug.
OT_LOG_LEVEL_INFO
OT_LOG_LEVEL_INFO 4
Log level Informational.
OT_LOG_LEVEL_NONE
OT_LOG_LEVEL_NONE 0
Log level None.
OT_LOG_LEVEL_NOTE
OT_LOG_LEVEL_NOTE 3
Log level Notice.
OT_LOG_LEVEL_WARN
OT_LOG_LEVEL_WARN 2
Log level Warning.