aboutsummaryrefslogtreecommitdiff
path: root/src/libmain/progress-bar.cc
diff options
context:
space:
mode:
authorBen Burdette <bburdette@gmail.com>2020-06-29 10:20:51 -0600
committerBen Burdette <bburdette@gmail.com>2020-06-29 10:20:51 -0600
commit8f81fae116b449ef17561c3574d01574544c798c (patch)
treee775375a0407c1cf16b727b2928335a392aab679 /src/libmain/progress-bar.cc
parentef24a0835d16baf1aa3f19ffa7ba7af54e6e63e6 (diff)
showTrace flag in loggers
Diffstat (limited to 'src/libmain/progress-bar.cc')
-rw-r--r--src/libmain/progress-bar.cc11
1 files changed, 10 insertions, 1 deletions
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)
{