aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdrian-Ken Rueegsegger <rueegsegger@swiss-it.ch>2010-05-02 14:37:16 +0200
committerMartin Willi <martin@revosec.ch>2010-05-04 14:47:56 +0200
commit17a02ff1b0ca5cd849fb007ba82cffb82bb64781 (patch)
tree094d7990a3ccd5d1e1c2138f04590745a14cad9b /src
parent71a66a623e72b6b7194a4e88f2bdabbea9962703 (diff)
downloadstrongswan-17a02ff1b0ca5cd849fb007ba82cffb82bb64781.tar.bz2
strongswan-17a02ff1b0ca5cd849fb007ba82cffb82bb64781.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/libcharon/daemon.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libcharon/daemon.c b/src/libcharon/daemon.c
index 11c94beb9..6243026b2 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,