mirror of
https://github.com/espressif/openthread.git
synced 2026-09-07 09:40:12 +00:00
[platform] implement otPlatLogOutput platform API (#12762)
This commit provides the platform-level implementation for the instance-aware logging API `otPlatLogOutput()`. This API is used when `OPENTHREAD_CONFIG_LOG_INSTANCE_AWARE_API_ENABLE` is enabled, allowing the platform to receive the `otInstance` pointer with each log line. The new API is implemented across: - The simulation platform logging. - The POSIX platform using `syslog()`. - The NCP base to route logs to the NCP host. - The CLI logging module. - Unit tests and mock platforms. The `OPENTHREAD_CONFIG_LOG_INSTANCE_AWARE_API_ENABLE` configuration is also enabled for Toranj simulations to support multi-instance log testing.
This commit is contained in:
@@ -280,6 +280,8 @@ OT_TOOL_WEAK otPlatResetReason otPlatGetResetReason(otInstance *) { return OT_PL
|
||||
|
||||
OT_TOOL_WEAK void otPlatWakeHost(void) {}
|
||||
|
||||
OT_TOOL_WEAK void otPlatLogOutput(otInstance *, otLogLevel, const char *) {}
|
||||
|
||||
OT_TOOL_WEAK void otPlatLog(otLogLevel, otLogRegion, const char *, ...) {}
|
||||
|
||||
OT_TOOL_WEAK void otPlatSettingsInit(otInstance *, const uint16_t *, uint16_t) {}
|
||||
|
||||
Reference in New Issue
Block a user