From 2106a9212ce6610b01f7019d5acf92ee1af5c8d8 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Sat, 15 Oct 2011 09:29:44 +0200 Subject: [PATCH] Adding "fflush" to debug.log. This is usefull when using "tail -f". The debug will be written to the debug.log file right when the debug function is called. --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index ce05452..6e91207 100644 --- a/main.c +++ b/main.c @@ -84,6 +84,7 @@ void debug(const char *function, int line, const char *prefix, char *buffer) fprintf(debug_fp, "%s%s(in %s() line %d): %s", prefix?prefix:"", prefix?" ":"", function, line, buffer); else fprintf(debug_fp, "%s%s: %s", prefix?prefix:"", prefix?" ":"", buffer); + fflush(debug_fp); } } -- 2.13.6