[log] add build option OT_LOG_MAX_SIZE to set the max log string size (#10948)

This commit is contained in:
Zhanglong Xia
2024-11-20 20:06:35 -08:00
committed by GitHub
parent d5d602267c
commit 7f6723ffb3
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const char *aFormat
if (sLogFile == NULL)
{
char logString[512];
char logString[12 /* NodeId */ + OPENTHREAD_CONFIG_LOG_MAX_SIZE];
int offset;
offset = snprintf(logString, sizeof(logString), "[%lu]", (unsigned long)gNodeId);