[strongSwan-dev] [PATCH] Flush messages to file after logging.
Adrian-Ken Rueegsegger
rueegsegger at swiss-it.ch
Wed Apr 28 23:15:48 CEST 2010
When configuring strongSwan to use a file logger the log output
to that file is only written when charon is shutdown or the file
buffer is full. This change flushes the log messages on each log
call.
---
src/libcharon/bus/listeners/file_logger.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/libcharon/bus/listeners/file_logger.c b/src/libcharon/bus/listeners/file_logger.c
index 12587de..3eb525a 100644
--- a/src/libcharon/bus/listeners/file_logger.c
+++ b/src/libcharon/bus/listeners/file_logger.c
@@ -68,6 +68,7 @@ static bool log_(private_file_logger_t *this, debug_t group, level_t level,
thread, debug_names, group, current);
current = next;
}
+ fflush(this->out);
}
/* always stay registered */
return TRUE;
--
1.6.5
More information about the Dev
mailing list