diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2016-01-01 02:46:14 -0500 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2016-01-01 20:29:24 -0500 |
commit | c22c06adbe2351bcfbbd60326fc3b600206e701e (patch) | |
tree | c5aeac2052a6a67dc6543e76c4a89bdfdce3f1ac /other/bootstrap_daemon/src/log.c | |
parent | 5d9e40bbd3c5b278a93ac55ebcdda1f793c8bcdd (diff) |
Flush stdout output
Apparently when no tty is attached, which is the case for Docker, the
buffer size for stdout increases to the point that only half of the
entire log might be written.
Diffstat (limited to 'other/bootstrap_daemon/src/log.c')
-rw-r--r-- | other/bootstrap_daemon/src/log.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/other/bootstrap_daemon/src/log.c b/other/bootstrap_daemon/src/log.c index b3aec180..d441b98e 100644 --- a/other/bootstrap_daemon/src/log.c +++ b/other/bootstrap_daemon/src/log.c | |||
@@ -94,6 +94,7 @@ FILE* level_stdout(LOG_LEVEL level) | |||
94 | void log_stdout(LOG_LEVEL level, const char *format, va_list args) | 94 | void log_stdout(LOG_LEVEL level, const char *format, va_list args) |
95 | { | 95 | { |
96 | vfprintf(level_stdout(level), format, args); | 96 | vfprintf(level_stdout(level), format, args); |
97 | fflush(level_stdout(level)); | ||
97 | } | 98 | } |
98 | 99 | ||
99 | bool write_log(LOG_LEVEL level, const char *format, ...) | 100 | bool write_log(LOG_LEVEL level, const char *format, ...) |