ATA Fixes, Module compilation fixups
[tpg/acess2.git] / Kernel / logging.c
index 747094d..507ff07 100644 (file)
@@ -65,6 +65,7 @@ EXPORT(Log_Debug);
 
 // === GLOBALS ===
 tSpinlock      glLog;
+tSpinlock      glLogOutput;
 tLogList       gLog;
 tLogList       gLog_Levels[NUM_LOG_LEVELS];
 
@@ -76,10 +77,12 @@ void Log_AddEvent(char *Ident, int Level, char *Format, va_list Args)
 {
         int    len;
        tLogEntry       *ent;
+       va_list args_tmp;
        
        if( Level >= NUM_LOG_LEVELS )   return;
        
-       len = vsnprintf(NULL, 256, Format, Args);
+       va_copy(args_tmp, Args);
+       len = vsnprintf(NULL, 256, Format, args_tmp);
        
        //Log("len = %i", len);
        
@@ -120,7 +123,7 @@ void Log_AddEvent(char *Ident, int Level, char *Format, va_list Args)
  */
 void Log_Int_PrintMessage(tLogEntry *Entry)
 {
-       LogF("%s%018lli%s [%+8s] %s\x1B[0m\n",
+       LogF("%s%014lli%s [%+8s] %s\x1B[0m\n",
                csaLevelColours[Entry->Level],
                Entry->Time,
                csaLevelCodes[Entry->Level],

UCC git Repository :: git.ucc.asn.au