0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-03 15:41:54 +00:00

Debug messages with timestamps.

On most of current hardware, getting monotonic clock is fast enough to
get it and write for each debug message.
This commit is contained in:
Maria Matejka 2021-06-28 15:43:45 +02:00
parent df3264f51f
commit a2af807357

View File

@ -439,6 +439,8 @@ done:
void void
log_init_debug(char *f) log_init_debug(char *f)
{ {
clock_gettime(CLOCK_MONOTONIC, &dbg_time_start);
if (dbgf && dbgf != stderr) if (dbgf && dbgf != stderr)
fclose(dbgf); fclose(dbgf);
if (!f) if (!f)