This module includes OpenThread logging related definitions.
Functions |
|
| otLogLevel | otLoggingGetLevel (void) |
|
This function returns the current log level.
|
|
| otError | otLoggingSetLevel ( otLogLevel aLogLevel) |
|
This function sets the log level.
|
|
| void | otLogCritPlat (const char *aFormat,...) |
|
This function emits a log message at critical log level.
|
|
| void | otLogWarnPlat (const char *aFormat,...) |
|
This function emits a log message at warning log level.
|
|
| void | otLogNotePlat (const char *aFormat,...) |
|
This function emits a log message at note log level.
|
|
| void | otLogInfoPlat (const char *aFormat,...) |
|
This function emits a log message at info log level.
|
|
| void | otLogDebgPlat (const char *aFormat,...) |
|
This function emits a log message at debug log level.
|
|
| void | otDumpCritPlat (const char *aText, const void *aData, uint16_t aDataLength) |
|
This function generates a memory dump at critical log level.
|
|
| void | otDumpWarnPlat (const char *aText, const void *aData, uint16_t aDataLength) |
|
This function generates a memory dump at warning log level.
|
|
| void | otDumpNotePlat (const char *aText, const void *aData, uint16_t aDataLength) |
|
This function generates a memory dump at note log level.
|
|
| void | otDumpInfoPlat (const char *aText, const void *aData, uint16_t aDataLength) |
|
This function generates a memory dump at info log level.
|
|
| void | otDumpDebgPlat (const char *aText, const void *aData, uint16_t aDataLength) |
|
This function generates a memory dump at debug log level.
|
|
| void | otLogCli ( otLogLevel aLogLevel, const char *aFormat,...) |
|
This function emits a log message at a given log level.
|
|
Detailed Description
This module includes OpenThread logging related definitions.
Function Documentation
◆ otDumpCritPlat()
| void otDumpCritPlat | ( | const char * |
aText,
|
| const void * |
aData,
|
||
| uint16_t |
aDataLength
|
||
| ) |
This function generates a memory dump at critical log level.
If
OPENTHREAD_CONFIG_LOG_PLATFORM
or
OPENTHREAD_CONFIG_LOG_PKT_DUMP
is not set or the current log level is below critical this function does not emit any log message.
- Parameters
-
[in] aTextA string that is printed before the bytes. [in] aDataA pointer to the data buffer. [in] aDataLengthNumber of bytes in aData.
◆ otDumpDebgPlat()
| void otDumpDebgPlat | ( | const char * |
aText,
|
| const void * |
aData,
|
||
| uint16_t |
aDataLength
|
||
| ) |
This function generates a memory dump at debug log level.
If
OPENTHREAD_CONFIG_LOG_PLATFORM
or
OPENTHREAD_CONFIG_LOG_PKT_DUMP
is not set or the current log level is below debug this function does not emit any log message.
- Parameters
-
[in] aTextA string that is printed before the bytes. [in] aDataA pointer to the data buffer. [in] aDataLengthNumber of bytes in aData.
◆ otDumpInfoPlat()
| void otDumpInfoPlat | ( | const char * |
aText,
|
| const void * |
aData,
|
||
| uint16_t |
aDataLength
|
||
| ) |
This function generates a memory dump at info log level.
If
OPENTHREAD_CONFIG_LOG_PLATFORM
or
OPENTHREAD_CONFIG_LOG_PKT_DUMP
is not set or the current log level is below info this function does not emit any log message.
- Parameters
-
[in] aTextA string that is printed before the bytes. [in] aDataA pointer to the data buffer. [in] aDataLengthNumber of bytes in aData.
◆ otDumpNotePlat()
| void otDumpNotePlat | ( | const char * |
aText,
|
| const void * |
aData,
|
||
| uint16_t |
aDataLength
|
||
| ) |
This function generates a memory dump at note log level.
If
OPENTHREAD_CONFIG_LOG_PLATFORM
or
OPENTHREAD_CONFIG_LOG_PKT_DUMP
is not set or the current log level is below note this function does not emit any log message.
- Parameters
-
[in] aTextA string that is printed before the bytes. [in] aDataA pointer to the data buffer. [in] aDataLengthNumber of bytes in aData.
◆ otDumpWarnPlat()
| void otDumpWarnPlat | ( | const char * |
aText,
|
| const void * |
aData,
|
||
| uint16_t |
aDataLength
|
||
| ) |
This function generates a memory dump at warning log level.
If
OPENTHREAD_CONFIG_LOG_PLATFORM
or
OPENTHREAD_CONFIG_LOG_PKT_DUMP
is not set or the current log level is below warning this function does not emit any log message.
- Parameters
-
[in] aTextA string that is printed before the bytes. [in] aDataA pointer to the data buffer. [in] aDataLengthNumber of bytes in aData.
◆ otLogCli()
| void otLogCli | ( | otLogLevel |
aLogLevel,
|
| const char * |
aFormat,
|
||
...
|
|||
| ) |
This function emits a log message at a given log level.
This function is intended for use by CLI only. If
OPENTHREAD_CONFIG_LOG_CLI
is not set or the current log level is below the given log level, this function does not emit any log message.
- Parameters
-
[in] aLogLevelThe log level. [in] aFormatThe format string. [in] ...Arguments for the format specification.
◆ otLogCritPlat()
| void otLogCritPlat | ( | const char * |
aFormat,
|
...
|
|||
| ) |
This function emits a log message at critical log level.
This function is intended for use by platform. If
OPENTHREAD_CONFIG_LOG_PLATFORM
is not set or the current log level is below critical, this function does not emit any log message.
- Parameters
-
[in] aFormatThe format string. [in] ...Arguments for the format specification.
◆ otLogDebgPlat()
| void otLogDebgPlat | ( | const char * |
aFormat,
|
...
|
|||
| ) |
This function emits a log message at debug log level.
This function is intended for use by platform. If
OPENTHREAD_CONFIG_LOG_PLATFORM
is not set or the current log level is below debug, this function does not emit any log message.
- Parameters
-
[in] aFormatThe format string. [in] ...Arguments for the format specification.
◆ otLoggingGetLevel()
| otLogLevel otLoggingGetLevel | ( | void |
|
) |
This function returns the current log level.
If dynamic log level feature
OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
is enabled, this function returns the currently set dynamic log level. Otherwise, this function returns the build-time configured log level.
- Returns
- The log level.
◆ otLoggingSetLevel()
| otError otLoggingSetLevel | ( | otLogLevel |
aLogLevel
|
) |
This function sets the log level.
- Note
-
This function requires
OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1.
- Parameters
-
[in] aLogLevelThe log level.
- Return values
-
OT_ERROR_NONESuccessfully updated log level. OT_ERROR_INVALID_ARGSLog level value is invalid.
◆ otLogInfoPlat()
| void otLogInfoPlat | ( | const char * |
aFormat,
|
...
|
|||
| ) |
This function emits a log message at info log level.
This function is intended for use by platform. If
OPENTHREAD_CONFIG_LOG_PLATFORM
is not set or the current log level is below info, this function does not emit any log message.
- Parameters
-
[in] aFormatThe format string. [in] ...Arguments for the format specification.
◆ otLogNotePlat()
| void otLogNotePlat | ( | const char * |
aFormat,
|
...
|
|||
| ) |
This function emits a log message at note log level.
This function is intended for use by platform. If
OPENTHREAD_CONFIG_LOG_PLATFORM
is not set or the current log level is below note, this function does not emit any log message.
- Parameters
-
[in] aFormatThe format string. [in] ...Arguments for the format specification.
◆ otLogWarnPlat()
| void otLogWarnPlat | ( | const char * |
aFormat,
|
...
|
|||
| ) |
This function emits a log message at warning log level.
This function is intended for use by platform. If
OPENTHREAD_CONFIG_LOG_PLATFORM
is not set or the current log level is below warning, this function does not emit any log message.
- Parameters
-
[in] aFormatThe format string. [in] ...Arguments for the format specification.