Skip to content

Commit c22c06a

Browse files
committed
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.
1 parent 5d9e40b commit c22c06a

File tree

1 file changed

+1
-0
lines changed
  • other/bootstrap_daemon/src

1 file changed

+1
-0
lines changed

other/bootstrap_daemon/src/log.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ FILE* level_stdout(LOG_LEVEL level)
9494
void log_stdout(LOG_LEVEL level, const char *format, va_list args)
9595
{
9696
vfprintf(level_stdout(level), format, args);
97+
fflush(level_stdout(level));
9798
}
9899

99100
bool write_log(LOG_LEVEL level, const char *format, ...)

0 commit comments

Comments
 (0)