modules: openthread: fix unused function error

Compile `log_translate` function only if `CONFIG_LOG` is defined.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
This commit is contained in:
Adrian Gielniewski 2025-05-07 12:30:57 +02:00 committed by Benjamin Cabé
parent 37a0e8c82b
commit a6bfd920f7

View File

@ -18,6 +18,7 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
#include "platform-zephyr.h"
#if defined(CONFIG_LOG)
/* Convert OT log level to zephyr log level. */
static inline int log_translate(otLogLevel aLogLevel)
{
@ -38,6 +39,7 @@ static inline int log_translate(otLogLevel aLogLevel)
return -1;
}
#endif
void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat, ...)
{