From d46c9caffe59f95f53c4eba3841e76ad7bc9ddb2 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Tue, 7 Jan 2014 23:59:57 +0100 Subject: [PATCH] Screen dump is now immediate (not buffered anymore). --- src/app/GLog.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+), 0 deletions(-) diff --git a/src/app/GLog.cpp b/src/app/GLog.cpp index 4d4c65d..57c188d 100644 --- a/src/app/GLog.cpp +++ b/src/app/GLog.cpp @@ -625,12 +625,14 @@ void GLog::flush(const bool& force) } // Put line into requested streams + /* if (m_stdout) { std::cout << line; } if (m_stderr) { std::cerr << line; } + */ if (m_file != NULL) { std::fprintf(m_file, "%s", line.c_str()); } @@ -807,6 +809,15 @@ void GLog::append(std::string arg) // Flush Buffer flush(); + // Append string to stdout and/or stderr without any buffering + // if requested + if (m_stdout) { + std::cout << arg; + } + if (m_stderr) { + std::cerr << arg; + } + // Return return; } -- libgit2 0.21.4