From 41609ef69ada3aaa740ceb2ac8d28da4d7803d74 Mon Sep 17 00:00:00 2001 From: Newow <73432240+NobWow@users.noreply.github.com> Date: Sun, 11 Jun 2023 14:55:53 +0600 Subject: [PATCH] Add fflush(stdout) after writing to stdout with printf fixes issues with backlog when server is running through a pipe --- src/utils/log.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/log.cpp b/src/utils/log.cpp index f50e1784c..fc472ea86 100644 --- a/src/utils/log.cpp +++ b/src/utils/log.cpp @@ -266,6 +266,7 @@ void Log::writeLine(const char *line, int level) CIrrDeviceiOS::debugPrint(line); #else printf("%s", line); + fflush(stdout); #endif } resetTerminalColor(); // this prints a \n