about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-10-18 10:04:39 -0700
committerKartik K. Agaram <vc@akkartik.com>2016-10-18 10:04:39 -0700
commit91d0b61e56319ed36f307cce7b461517e622ebda (patch)
tree80a8b656da049068670e17c854f5e311f42f8769
parent5fafd700e4499463e2daea43c30020e81b5fd0a6 (diff)
downloadmu-91d0b61e56319ed36f307cce7b461517e622ebda.tar.gz
3516 - print the trace as it is generated
I had this early on. Why did I delete it? Was it because I was only
flushing the current trace when I started on the next one? We don't have
that problem anymore..
-rw-r--r--003trace.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/003trace.cc b/003trace.cc
index 35cb46d3..e7bb56cf 100644
--- a/003trace.cc
+++ b/003trace.cc
@@ -88,8 +88,10 @@ struct trace_line {
 
 :(before "End Globals")
 bool Hide_errors = false;
+bool Dump_trace = false;
 :(before "End Setup")
 Hide_errors = false;
+Dump_trace = false;
 
 :(before "End Types")
 // Pre-define some global constants that trace_stream needs to know about.
@@ -135,7 +137,7 @@ void trace_stream::newline() {
   string curr_contents = curr_stream->str();
   if (!curr_contents.empty()) {
     past_lines.push_back(trace_line(curr_depth, trim(curr_label), curr_contents));  // preserve indent in contents
-    if (!Hide_errors && curr_label == "error")
+    if (Dump_trace || (!Hide_errors && curr_label == "error"))
       cerr << curr_label << ": " << curr_contents << '\n';
   }
   delete curr_stream;