From: Florian Prill Date: Fri, 14 Sep 2007 13:16:39 +0000 (+0000) Subject: Added a function to the logstream class telling the user whether a file has been... X-Git-Tag: v8.0.0~9844 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc0237c1d1dfd936644251ad640da1dc44bf2fb5;p=dealii.git Added a function to the logstream class telling the user whether a file has been attached or not. git-svn-id: https://svn.dealii.org/trunk@15214 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/logstream.h b/deal.II/base/include/base/logstream.h index b9d8b3a075..0e79715979 100644 --- a/deal.II/base/include/base/logstream.h +++ b/deal.II/base/include/base/logstream.h @@ -95,6 +95,12 @@ class LogStream */ std::ostream& get_file_stream (); + /** + * @return true, if file stream + * has already been attached. + */ + bool has_file () const; + /** * Reroutes cerr to LogStream. * Works as a switch, turning diff --git a/deal.II/base/source/log.cc b/deal.II/base/source/log.cc index 50df78c862..9151fff838 100644 --- a/deal.II/base/source/log.cc +++ b/deal.II/base/source/log.cc @@ -103,6 +103,13 @@ LogStream::get_file_stream() } +bool +LogStream::has_file() const +{ + return (file != 0); +} + + const std::string& LogStream::get_prefix() const {