Skip to content

Commit

Permalink
Added use of fflush() to log_log()
Browse files Browse the repository at this point in the history
  • Loading branch information
rxi committed Jul 21, 2018
1 parent b7414f3 commit 783d481
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ void log_log(int level, const char *file, int line, const char *fmt, ...) {
vfprintf(stderr, fmt, args);
va_end(args);
fprintf(stderr, "\n");
fflush(stderr);
}

/* Log to file */
Expand All @@ -127,6 +128,7 @@ void log_log(int level, const char *file, int line, const char *fmt, ...) {
vfprintf(L.fp, fmt, args);
va_end(args);
fprintf(L.fp, "\n");
fflush(L.fp);
}

/* Release lock */
Expand Down

0 comments on commit 783d481

Please sign in to comment.