From 9353569934e08c4ba531da5b64aeb4ae08ac2aae Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Mon, 24 Sep 2018 18:47:42 -0700 Subject: 4515 New '--dump' commandline arg to incrementally print trace lines to stderr as they're emitted. --- subx/003trace.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/subx/003trace.cc b/subx/003trace.cc index 863289dc..da5f3807 100644 --- a/subx/003trace.cc +++ b/subx/003trace.cc @@ -175,6 +175,14 @@ string trace_stream::readable_contents(string label) { trace_stream* Trace_stream = NULL; int Trace_errors = 0; // used only when Trace_stream is NULL +//: option to print trace to the screen +:(before "End Globals") +bool Flag_dump_trace = false; +:(before "End Commandline Options(*arg)") +else if (is_equal(*arg, "--dump")) { + Flag_dump_trace = true; +} + :(before "End Globals") bool Hide_errors = false; // if set, don't print even error trace lines to screen bool Hide_warnings = false; // if set, don't print warnings to screen @@ -183,7 +191,7 @@ string Dump_label = ""; // if set, print trace lines matching a single label to :(before "End Reset") Hide_errors = false; Hide_warnings = false; -Dump_trace = false; // toggle this to print traces to screen as they are emitted +Dump_trace = Flag_dump_trace; Dump_label = ""; //: Never dump warnings in scenarios :(before "End Test Setup") -- cgit 1.4.1-2-gfad0