Skip to main content

otPlatLogOutput

Function otPlatLogOutput 

Source
pub unsafe extern "C" fn otPlatLogOutput(
    aInstance: *mut otInstance,
    aLogLevel: otLogLevel,
    aLogLine: *const c_char,
)
Expand description

Outputs a log line.

This platform API is an alternative to otPlatLog() and is used when the configuration OPENTHREAD_CONFIG_LOG_INSTANCE_AWARE_API_ENABLE is enabled.

Unlike otPlatLog(), this API also provides a pointer to the OpenThread instance (otInstance*) from which the log is generated. This is particularly helpful in a multi-instance setup to distinguish logs from different instances. Additionally, it provides the log line as a fully formatted null-terminated string instead of a format string and variable arguments.

@param[in] aInstance A pointer to the OpenThread instance. @param[in] aLogLevel The log level. @param[in] aLogLine A pointer to the null-terminated string containing the log line.