mirror of
https://github.com/espressif/openthread.git
synced 2026-09-16 14:10:09 +00:00
[log] add build option OT_LOG_MAX_SIZE to set the max log string size (#10948)
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -93,7 +93,8 @@ extern "C" {
|
||||
* stack.
|
||||
*/
|
||||
#ifndef LOG_PARSE_BUFFER_SIZE
|
||||
#define LOG_PARSE_BUFFER_SIZE 128
|
||||
#define LOG_PARSE_BUFFER_SIZE \
|
||||
(19 /* Timestamp */ + 8 /* RTT color code */ + OPENTHREAD_CONFIG_LOG_MAX_SIZE + 1 /* \n */)
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user