mirror of https://git.kore.io/kore.git
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);
|
t = gmtime(&ts.tv_sec);
|
||||||
|
|
||||||
if (strftime(tbuf, sizeof(tbuf), "%Y-%m-%d %H:%M:%S", t) > 0)
|
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);
|
vfprintf(fp, fmt, args);
|
||||||
fflush(fp);
|
fflush(fp);
|
||||||
|
|
Loading…
Reference in New Issue