mirror of
https://github.com/jorisvink/kore
synced 2025-03-09 04:29:02 -04:00
Lets make sure milliseconds are formatted nicely.
This commit is contained in:
parent
41511c1683
commit
a2d48feeb7
@ -150,7 +150,7 @@ log_print(int prio, const char *fmt, ...)
|
||||
t = gmtime(&ts.tv_sec);
|
||||
|
||||
if (strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", t) > 0)
|
||||
fprintf(fp, "%s.%ld UTC ", tbuf, ts.tv_nsec / 1000000);
|
||||
fprintf(fp, "%s.%03ld UTC ", tbuf, ts.tv_nsec / 1000000);
|
||||
|
||||
vfprintf(fp, fmt, args);
|
||||
fflush(fp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user