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


_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to