mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-26 23:25:56 -05:00
[logger] Show long log messages truncated
This commit is contained in:
parent
a289135325
commit
b43e174baf
@ -121,8 +121,10 @@ vlogger_writer(int severity, int domain, const char *fmt, va_list args)
|
|||||||
|
|
||||||
va_copy(ap, args);
|
va_copy(ap, args);
|
||||||
ret = vsnprintf(content, sizeof(content), fmt, ap);
|
ret = vsnprintf(content, sizeof(content), fmt, ap);
|
||||||
if (ret < 0 || ret >= sizeof(content))
|
if (ret < 0)
|
||||||
strcpy(content, "(LOGGING SKIPPED - invalid content)\n");
|
strcpy(content, "(LOGGING SKIPPED - error printing log message)\n");
|
||||||
|
else if (ret >= sizeof(content))
|
||||||
|
strcpy(content + sizeof(content) - 8, "...\n");
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
ret = repeat_count(content);
|
ret = repeat_count(content);
|
||||||
|
Loading…
Reference in New Issue
Block a user