1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

showTrace flag in loggers

This commit is contained in:
Ben Burdette 2020-06-29 10:20:51 -06:00
parent ef24a0835d
commit 8f81fae116
10 changed files with 60 additions and 20 deletions

View file

@ -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)
{