logging: enable line buffering of file log
The file log specified with the -l option should have the messages as soon as they are produced.
This commit is contained in:
parent
554b9b06de
commit
d70df3daab
1 changed files with 3 additions and 0 deletions
|
@ -188,6 +188,9 @@ LOG_OpenFileLog(const char *log_file)
|
||||||
if (!f)
|
if (!f)
|
||||||
LOG_FATAL("Could not open log file %s", log_file);
|
LOG_FATAL("Could not open log file %s", log_file);
|
||||||
|
|
||||||
|
/* Enable line buffering */
|
||||||
|
setvbuf(f, NULL, _IOLBF, BUFSIZ);
|
||||||
|
|
||||||
file_log = f;
|
file_log = f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue