* @item @p{deallog.pop()} when leaving that stage entered with @p{push}.
* @end{itemize}
*
- * @author Guido Kanschat, Wolfgang Bangerth, 1999
+ * @author Guido Kanschat, Wolfgang Bangerth, 1999, 2003
*/
class LogStream
{
* prefixes is printed. By calling
* this function with @p{n=0}, no
* console output will be written.
+ *
+ * The previous value of this
+ * parameter is returned.
*/
- void depth_console (const unsigned int n);
+ unsigned int depth_console (const unsigned int n);
/**
* Maximum number of levels to be
* this function should be used
* with care, since it may spoile
* the value of a log file.
+ *
+ * The previous value of this
+ * parameter is returned.
*/
- void depth_file (const unsigned int n);
+ unsigned int depth_file (const unsigned int n);
/**
* Set time printing flag. If this flag
* is true, each output line will
* be prepended by the user time used
* by the running program so far.
+ *
+ * The previous value of this
+ * parameter is returned.
*/
- void log_execution_time (const bool flag);
+ bool log_execution_time (const bool flag);
/**
* Output time differences
* The measurement of times is
* not changed by this function,
* just the output.
+ *
+ * The previous value of this
+ * parameter is returned.
*/
- void log_time_differences (const bool flag);
+ bool log_time_differences (const bool flag);
/**
* Output a constant something
}
-void
+unsigned int
LogStream::depth_console (const unsigned n)
{
+ const unsigned int h = std_depth;
std_depth = n;
+ return h;
}
-void
+unsigned int
LogStream::depth_file (const unsigned n)
{
+ const unsigned int h = file_depth;
file_depth = n;
+ return h;
}
-void
+bool
LogStream::log_execution_time (const bool flag)
{
+ const bool h = print_utime;
print_utime = flag;
+ return h;
}
-void
+bool
LogStream::log_time_differences (const bool flag)
{
+ const bool h = diff_utime;
diff_utime = flag;
+ return h;
}
<h3>base</h3>
<ol>
+
+ <li> <p>
+ Improved: <code class="class">Logstream</code>::<code
+ class="member">depth_console</code>, <code
+ class="class">Logstream</code>::<code class="member">depth_file</code>, <code
+ class="class">Logstream</code>::<code class="member">log_execution_time</code> and <code
+ class="class">Logstream</code>::<code class="member">log_time_differences</code>
+ return the previous value.
+ <br>
+ (GK 2003/06/22)
+ </p>
</ol>