From: guido Date: Wed, 2 May 2001 07:18:30 +0000 (+0000) Subject: new function get_prefix in LogStream X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5aafb3278f2fa65b5bbae1371a4ad13a50f6b972;p=dealii-svn.git new function get_prefix in LogStream git-svn-id: https://svn.dealii.org/trunk@4515 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/include/base/logstream.h b/deal.II/base/include/base/logstream.h index cd9c44406c..f20f699082 100644 --- a/deal.II/base/include/base/logstream.h +++ b/deal.II/base/include/base/logstream.h @@ -78,6 +78,11 @@ class LogStream * Gives the file stream. */ std::ostream& get_file_stream (); + + /** + * Return the prefix string. + */ + const std::string& get_prefix () const; /** * Push another prefix on the diff --git a/deal.II/base/source/log.cc b/deal.II/base/source/log.cc index 7a79a3ae23..351e30696a 100644 --- a/deal.II/base/source/log.cc +++ b/deal.II/base/source/log.cc @@ -63,6 +63,13 @@ LogStream::get_file_stream() } +const std::string& +LogStream::get_prefix() const +{ + return prefixes.top(); +} + + void LogStream::push (const std::string& text) { @@ -125,7 +132,7 @@ LogStream::print_line_head() } } - const std::string& head = prefixes.top(); + const std::string& head = get_prefix(); if (prefixes.size() <= std_depth) {