From 8f81fae116b449ef17561c3574d01574544c798c Mon Sep 17 00:00:00 2001 From: Ben Burdette Date: Mon, 29 Jun 2020 10:20:51 -0600 Subject: showTrace flag in loggers --- src/libmain/progress-bar.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/libmain/progress-bar.cc') diff --git a/src/libmain/progress-bar.cc b/src/libmain/progress-bar.cc index 95a9187de..8da0f942e 100644 --- a/src/libmain/progress-bar.cc +++ b/src/libmain/progress-bar.cc @@ -81,12 +81,14 @@ private: bool printBuildLogs; bool isTTY; + bool showTrace; public: ProgressBar(bool printBuildLogs, bool isTTY) : printBuildLogs(printBuildLogs) , isTTY(isTTY) + , showTrace(false) { state_.lock()->active = isTTY; updateThread = std::thread([&]() { @@ -131,10 +133,17 @@ public: auto state(state_.lock()); std::stringstream oss; - oss << ei; + showErrorInfo(oss, ei, showTrace); + // oss << ei; log(*state, ei.level, oss.str()); } + bool getShowTrace() const override { + return showTrace; + } + void setShowTrace(bool showTrace) override { + this->showTrace = showTrace; + } void log(State & state, Verbosity lvl, const std::string & s) { -- cgit v1.2.3