From: Adrian-Ken Rueegsegger Date: Sun, 2 May 2010 12:37:16 +0000 (+0200) Subject: Add 'flush_line' option to filelog section. X-Git-Tag: 4.4.1~296 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17a02ff1b0ca5cd849fb007ba82cffb82bb64781;p=thirdparty%2Fstrongswan.git 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. --- diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c index 11c94beb94..6243026b2a 100644 --- a/src/libcharon/daemon.c +++ b/src/libcharon/daemon.c @@ -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,