From: Matthias Maier Date: Sun, 13 Aug 2017 22:03:20 +0000 (-0500) Subject: LogStream: Do not default to std::cerr, but std::cout X-Git-Tag: v9.0.0-rc1~1261^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4d10fb390f987e2a1d063d955744cd81f686df4;p=dealii.git LogStream: Do not default to std::cerr, but std::cout --- diff --git a/include/deal.II/base/logstream.h b/include/deal.II/base/logstream.h index 0724eb443a..59dc8f0ae5 100644 --- a/include/deal.II/base/logstream.h +++ b/include/deal.II/base/logstream.h @@ -125,9 +125,8 @@ public: /** - * Standard constructor, since we intend to provide an object - * deallog in the library. Set the standard output stream to - * std::cerr. + * Standard constructor. The standard output stream to + * std::cout. */ LogStream (); @@ -291,7 +290,7 @@ private: /** * Default stream, where the output is to go to. This stream defaults to - * std::cerr, but can be set to another stream through the + * std::cout, but can be set to another stream through the * constructor. */ std::ostream *std_out; diff --git a/source/base/logstream.cc b/source/base/logstream.cc index de9757600d..3684c9de76 100644 --- a/source/base/logstream.cc +++ b/source/base/logstream.cc @@ -38,7 +38,7 @@ LogStream deallog; LogStream::LogStream() : - std_out(&std::cerr), + std_out(&std::cout), file(nullptr), std_depth(0), file_depth(10000), @@ -71,13 +71,13 @@ LogStream::~LogStream() // may want to write to 'deallog' itself, and AssertThrow will // throw an exception that can't be caught) if ((this == &deallog) && file) - std::cerr << ("You still have content that was written to 'deallog' " - "but not flushed to the screen or a file while the " - "program is being terminated. This would lead to a " - "segmentation fault. Make sure you flush the " - "content of the 'deallog' object using 'std::endl' " - "before the end of the program.") - << std::endl; + *std_out << ("You still have content that was written to 'deallog' " + "but not flushed to the screen or a file while the " + "program is being terminated. This would lead to a " + "segmentation fault. Make sure you flush the " + "content of the 'deallog' object using 'std::endl' " + "before the end of the program.") + << std::endl; else *this << std::endl; }