Skip to content

Commit af04a8d

Browse files
committed
Print what's left in the buffer when destroying the logger (see #3462)
1 parent ffaee77 commit af04a8d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/log.c

+6
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ static void *janus_log_thread(void *ctx) {
9898
/* Done, get rid of this log line */
9999
janus_log_buffer_free(b);
100100
}
101+
/* Print all that's left to print */
102+
while((b = g_async_queue_try_pop(janus_log_queue)) != NULL) {
103+
if(b->str != NULL)
104+
janus_log_print_buffer(b);
105+
janus_log_buffer_free(b);
106+
}
101107
if(janus_log_console)
102108
fflush(stdout);
103109
if(janus_log_file)

0 commit comments

Comments
 (0)