From e90f559a10fd47bb6923a635f8bd0e9574f87abd Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Fri, 13 Oct 2017 22:41:16 +0200 Subject: [PATCH] Flushing stderr for each line when using --machineReadable flag --- src/rhubarb/sinks.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rhubarb/sinks.cpp b/src/rhubarb/sinks.cpp index 5045499..07dadbe 100644 --- a/src/rhubarb/sinks.cpp +++ b/src/rhubarb/sinks.cpp @@ -118,5 +118,7 @@ void MachineReadableStderrSink::receive(const logging::Entry& entry) { if (line) { std::cerr << *line << std::endl; + // Make sure the stream is flushed so that applications listening to it get the line immediately + fflush(stderr); } }