From: Steven Schubiger Date: Wed, 30 Dec 2020 21:02:35 +0000 (+0100) Subject: main(): postpone invoking STACK_FILE(log) X-Git-Url: http://git.refcnt.org/?p=colorize.git;a=commitdiff_plain;h=6c3684cc6d44ccc8bf2ab583abca40fb6c5ce1b3 main(): postpone invoking STACK_FILE(log) --- diff --git a/colorize.c b/colorize.c index 38b2350..9a6a6f9 100644 --- a/colorize.c +++ b/colorize.c @@ -383,8 +383,12 @@ main (int argc, char **argv) #if DEBUG log = open_file (DEBUG_FILE, "w"); - STACK_FILE (log); print_tstamp (log); + /* We're in debugging mode, hence we can't invoke STACK_FILE() + prior to print_tstamp(), because both cause text to be written + to the same logfile which is expected to have the timestamp + first. */ + STACK_FILE (log); #endif attr[0] = '\0';