mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-02-03 18:49:28 -05:00
debug: log all planned events after finishing each
This commit is contained in:
parent
8c4416b88b
commit
74c646ef36
1 changed files with 8 additions and 0 deletions
|
|
@ -256,6 +256,14 @@ static void event_wrap(worker_task_t *task)
|
|||
pthread_cond_broadcast(events->run_end);
|
||||
}
|
||||
|
||||
char dbg_log[512] = { 0 }, *dbg_log_end = &dbg_log[0];
|
||||
time_t now = time(NULL);
|
||||
for (int i = 0; i < ZONE_EVENT_COUNT; i++) {
|
||||
time_t t = events->time[i];
|
||||
dbg_log_end += snprintf(dbg_log_end, sizeof(dbg_log) - (dbg_log_end - dbg_log), "%s %c%ld; ", zone_events_get_name(i), t ? '+' : ' ', t ? t - now : 0);
|
||||
}
|
||||
log_zone_info(zone->name, "events: %s", dbg_log);
|
||||
|
||||
reschedule(events, true); // unlocks events->mx
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue