From a007544f976d7da8e174913d23201088c6e9d4d8 Mon Sep 17 00:00:00 2001 From: prill Date: Fri, 14 Sep 2007 13:16:39 +0000 Subject: [PATCH] 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 --- deal.II/base/include/base/logstream.h | 6 ++++++ deal.II/base/source/log.cc | 7 +++++++ 2 files changed, 13 insertions(+) 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 { -- 2.39.5