X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Flogging.c;h=507ff07cf70ac01d69eabebd04e28ac2c7e5afeb;hb=05dcc886a503b09aeddaed02a063c2a87c39cd9a;hp=54f16cadc4ab76b8dc5274f267b854b23405f975;hpb=587078c9b833b5fa1cae8b445475000706de8441;p=tpg%2Facess2.git diff --git a/Kernel/logging.c b/Kernel/logging.c index 54f16cad..507ff07c 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,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],