0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 09: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
log_init_debug(char *f)
{
clock_gettime(CLOCK_MONOTONIC, &dbg_time_start);
if (dbgf && dbgf != stderr)
fclose(dbgf);
if (!f)