Moved log_all event until AFTER logs
authorRick Bird <nveid@bender.theari.com>
Wed, 11 May 2011 22:16:05 +0000 (18:16 -0400)
committerRick Bird <nveid@bender.theari.com>
Wed, 11 May 2011 22:16:05 +0000 (18:16 -0400)
src/log.c

index 4ec8e8b32e684ad8b248fbcfea5b5f54b8289d9c..a48e8670f1fdb431aa98465c49e7dff9d297ba64 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -242,14 +242,15 @@ do_rawlog(int logtype, const char *fmt, ...)
     f = stderr;
     break;
   }
-  if((chook = (struct core_hook_t *) hashfind("LOG_ALL.AFTER", &chook_htab))) {
-    for(centry = chook->hooks; centry != NULL ; centry = centry->next)
-      CHook_Run(centry, "%# %d %s", global_eval_context.cplr, logtype, tbuf1);
-  }
   lock_file(f);
   fprintf(f, "%s %s\n", timebuf, tbuf1);
   fflush(f);
   unlock_file(f);
+ if((chook = (struct core_hook_t *) hashfind("LOG_ALL.AFTER", &chook_htab))) {
+    for(centry = chook->hooks; centry != NULL ; centry = centry->next)
+      CHook_Run(centry, "%# %d %s", global_eval_context.cplr, logtype, tbuf1);
+  }
+  
 }
 
 /** Log a message, with useful information.