X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Flogging.c;h=6ba68bff99cf7d1dcea89c206d8b7ac42800987f;hb=ccd6cf2af99fdc050888c70eb4d59f078a15a2da;hp=54f16cadc4ab76b8dc5274f267b854b23405f975;hpb=587078c9b833b5fa1cae8b445475000706de8441;p=tpg%2Facess2.git diff --git a/Kernel/logging.c b/Kernel/logging.c index 54f16cad..6ba68bff 100644 --- a/Kernel/logging.c +++ b/Kernel/logging.c @@ -77,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); @@ -121,13 +123,15 @@ 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", + //LOCK( &glLogOutput ); + LogF("%s%014lli%s [%+8s] %s\x1B[0m\n", csaLevelColours[Entry->Level], Entry->Time, csaLevelCodes[Entry->Level], Entry->Ident, Entry->Data ); + //RELEASE( &glLogOutput ); } /**