logging: enable line buffering on stderr

This should avoid mixed lines on console or in file log when multiple
processes will be logging messages at the same time.
This commit is contained in:
Miroslav Lichvar 2019-11-20 10:47:16 +01:00
parent 54d7e3e94a
commit d05e9fb2ec

View file

@ -42,7 +42,7 @@ LOG_Severity log_min_severity = LOGS_INFO;
/* Flag indicating we have initialised */
static int initialised = 0;
static FILE *file_log;
static FILE *file_log = NULL;
static int system_log = 0;
static int parent_fd = 0;
@ -68,7 +68,7 @@ void
LOG_Initialise(void)
{
initialised = 1;
file_log = stderr;
LOG_OpenFileLog(NULL);
}
/* ================================================== */