Add 'flush_line' option to filelog section.

The new boolean 'flush_line' option in the filelog section of
strongswan.conf specifies if log messages should be flushed to the given
file for each new line.
This commit is contained in:
Adrian-Ken Rueegsegger
2010-05-04 14:47:56 +02:00
committed by Martin Willi
parent 71a66a623e
commit 17a02ff1b0
+5
View File
@@ -254,6 +254,11 @@ static void initialize_loggers(private_daemon_t *this, bool use_stderr,
filename, strerror(errno));
continue;
}
if (lib->settings->get_bool(lib->settings,
"charon.filelog.%s.flush_line", FALSE, filename))
{
setlinebuf(file);
}
}
file_logger = file_logger_create(file);
def = lib->settings->get_int(lib->settings,