Skip to content

Commit

Permalink
Print what's left in the buffer when destroying the logger (see meete…
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero authored and adnan-mujagic committed Oct 25, 2024
1 parent 56a7968 commit 7caf8d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ static void *janus_log_thread(void *ctx) {
/* Done, get rid of this log line */
janus_log_buffer_free(b);
}
/* Print all that's left to print */
while((b = g_async_queue_try_pop(janus_log_queue)) != NULL) {
if(b->str != NULL)
janus_log_print_buffer(b);
janus_log_buffer_free(b);
}
if(janus_log_console)
fflush(stdout);
if(janus_log_file)
Expand Down

0 comments on commit 7caf8d2

Please sign in to comment.