]> jfr.im git - irc/quakenet/newserv.git/blobdiff - core/error.c
CORE: fflush logfile and stderr on Error().
[irc/quakenet/newserv.git] / core / error.c
index edd986990bb5e7056f329c07c9c3fa5a3a403e1c..5beb8c88f05a8a648831aee6b6544dc577a3619d 100644 (file)
@@ -75,8 +75,12 @@ void Error(char *source, int severity, char *reason, ... ) {
     tm=gmtime(&now);
     strftime(timebuf,100,"%Y-%m-%d %H:%M:%S",tm);
     fprintf(stderr,"[%s] %s(%s): %s\n",timebuf,sevtostring(severity),source,buf);
-    if (logfile) 
+    fflush(stderr);
+
+    if (logfile)  {
       fprintf(logfile,"[%s] %s(%s): %s\n",timebuf,sevtostring(severity),source,buf);
+      fflush(logfile);
+    }
   }
   
   if (severity>=ERR_STOP) {