From 283e405c063acfca304acbff505badcbbcb814c9 Mon Sep 17 00:00:00 2001 From: shshshsh Date: Sun, 11 May 2014 13:29:16 +0000 Subject: [PATCH] Switch stdout to line buffering Use line buffering (instead of block buffering) so that messages arrive immediately in systemd-journald, tail -f debug.log, and the like. --- src/init.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/init.cpp b/src/init.cpp index 77c32d0b4..2c3bb0275 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -25,6 +25,7 @@ #endif #include +#include #ifndef WIN32 #include @@ -530,6 +531,7 @@ bool AppInit2(boost::thread_group& threadGroup) fServer = GetBoolArg("-server", false); fPrintToConsole = GetBoolArg("-printtoconsole", false); fLogTimestamps = GetBoolArg("-logtimestamps", true); + setvbuf(stdout, NULL, _IOLBF, 0); #ifdef ENABLE_WALLET bool fDisableWallet = GetBoolArg("-disablewallet", false); #endif