diff --git a/src/log.c b/src/log.c index 7c74ec0..2e183b0 100644 --- a/src/log.c +++ b/src/log.c @@ -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 */ @@ -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 */