Flush stderr after each log statement
authorSiraaj Khandkar <siraaj@khandkar.net>
Sun, 15 Mar 2020 00:08:51 +0000 (20:08 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sun, 15 Mar 2020 00:08:51 +0000 (20:08 -0400)
x5/khatus.c

index cc28cba..ea63fa1 100644 (file)
@@ -15,9 +15,9 @@
 
 #include "bsdtimespec.h"
 
-#define debug(args...) {fprintf(stderr, "[debug] " args);}
-#define info( args...) {fprintf(stderr, "[info] "  args);}
-#define error(args...) {fprintf(stderr, "[error] " args);}
+#define debug(args...) {fprintf(stderr, "[debug] " args); fflush(stderr);}
+#define info( args...) {fprintf(stderr, "[info] "  args); fflush(stderr);}
+#define error(args...) {fprintf(stderr, "[error] " args); fflush(stderr);}
 #define fatal(args...) {fprintf(stderr, "[fatal] " args); exit(EXIT_FAILURE);}
 #define usage(args...) {print_usage(); fatal("[usage] " args);}
 
This page took 0.026292 seconds and 4 git commands to generate.