1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

logs: don't print junk if no timestamp

This commit is contained in:
Andy Green 2020-03-06 07:40:07 +00:00
parent 1c6735e1a0
commit 8dff5b7342

View file

@ -126,6 +126,7 @@ _lwsl_emit_stderr(int level, const char *line, int ts)
if (!tty)
tty = isatty(2) | 2;
buf[0] = '\0';
#if defined(LWS_LOGS_TIMESTAMP)
if (ts)
lwsl_timestamp(level, buf, sizeof(buf));