]> https://gitweb.dealii.org/ - dealii.git/commitdiff
LogStream: Do not default to std::cerr, but std::cout
authorMatthias Maier <tamiko@43-1.org>
Sun, 13 Aug 2017 22:03:20 +0000 (17:03 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 13 Aug 2017 22:32:20 +0000 (17:32 -0500)
include/deal.II/base/logstream.h
source/base/logstream.cc

index 0724eb443a966c30a7505fa61fe827793056905f..59dc8f0ae5c79b7a1ffef124782a2731e7caf44f 100644 (file)
@@ -125,9 +125,8 @@ public:
 
 
   /**
-   * Standard constructor, since we intend to provide an object
-   * <tt>deallog</tt> in the library. Set the standard output stream to
-   * <tt>std::cerr</tt>.
+   * Standard constructor. The standard output stream to
+   * <tt>std::cout</tt>.
    */
   LogStream ();
 
@@ -291,7 +290,7 @@ private:
 
   /**
    * Default stream, where the output is to go to. This stream defaults to
-   * <tt>std::cerr</tt>, but can be set to another stream through the
+   * <tt>std::cout</tt>, but can be set to another stream through the
    * constructor.
    */
   std::ostream  *std_out;
index de9757600dcb4b2fe27ddfe662e029355606c9e7..3684c9de760ee0b205e009730d2bd043b339b654 100644 (file)
@@ -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;
       }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.