log: Flushing logs on every line

This is needed for the new testing framework since we wait for
messages to be printed on stdout. Buffering delays this
arbitrarily. Flushing so often should not have much of a performance
impact.
This commit is contained in:
Christian Decker 2016-12-22 16:25:07 +01:00 committed by Rusty Russell
parent 2fb2e757ae
commit 3f79a0e117
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ static void log_default_print(const char *prefix,
} else {
printf("%s \t%s\n", prefix, str);
}
fflush(stdout);
}
static size_t log_bufsize(const struct log_entry *e)