flush log file

This commit is contained in:
Olof Hagsand 2018-07-30 18:08:34 +00:00
parent c53f3f2fe3
commit 0355942740

View file

@ -240,6 +240,7 @@ clicon_log_str(int level,
if ((_logflags & CLICON_LOG_FILE) && _logfile){ if ((_logflags & CLICON_LOG_FILE) && _logfile){
flogtime(_logfile); flogtime(_logfile);
fprintf(_logfile, "%s\n", msg); fprintf(_logfile, "%s\n", msg);
fflush(_logfile);
} }
if (_log_notify_cb){ if (_log_notify_cb){
static int cb = 0; static int cb = 0;