Commit d46c9caffe59f95f53c4eba3841e76ad7bc9ddb2

Authored by Jürgen Knödlseder
1 parent 2e61708a

Screen dump is now immediate (not buffered anymore).

Showing 1 changed file with 11 additions and 0 deletions
src/app/GLog.cpp
... ... @@ -625,12 +625,14 @@ void GLog::flush(const bool& force)
625 625 }
626 626  
627 627 // Put line into requested streams
  628 + /*
628 629 if (m_stdout) {
629 630 std::cout << line;
630 631 }
631 632 if (m_stderr) {
632 633 std::cerr << line;
633 634 }
  635 + */
634 636 if (m_file != NULL) {
635 637 std::fprintf(m_file, "%s", line.c_str());
636 638 }
... ... @@ -807,6 +809,15 @@ void GLog::append(std::string arg)
807 809 // Flush Buffer
808 810 flush();
809 811  
  812 + // Append string to stdout and/or stderr without any buffering
  813 + // if requested
  814 + if (m_stdout) {
  815 + std::cout << arg;
  816 + }
  817 + if (m_stderr) {
  818 + std::cerr << arg;
  819 + }
  820 +
810 821 // Return
811 822 return;
812 823 }
... ...