diff --git a/libutils/logging.c b/libutils/logging.c index 3f5a1f838d..2d0aa78a75 100644 --- a/libutils/logging.c +++ b/libutils/logging.c @@ -175,6 +175,12 @@ static void LogToConsole(const char *msg, LogLevel level, bool color) fprintf(stdout, "%8s: %s\n", LogLevelToString(level), msg); + if (level == LOG_LEVEL_DEBUG) + { + fflush(stdout); + // TODO also possibly call sync()? Not sure if that's too "expensive" or not. + } + if (color) { // Turn off the color again.