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..
This commit is contained in:
Kartik K. Agaram 2016-10-18 10:04:39 -07:00
parent 5fafd700e4
commit 91d0b61e56
1 changed files with 3 additions and 1 deletions

View File

@ -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;