From 2cc345b95f19334e7050c7203a5f6823af24344f Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 28 Aug 2017 19:13:24 +0200 Subject: Give activities a verbosity level again And print them (separately from the progress bar) given sufficient -v flags. --- src/nix/progress-bar.cc | 7 +++++-- src/nix/verify.cc | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/nix') diff --git a/src/nix/progress-bar.cc b/src/nix/progress-bar.cc index 70dbfd4e5964..341866679186 100644 --- a/src/nix/progress-bar.cc +++ b/src/nix/progress-bar.cc @@ -126,9 +126,12 @@ public: update(state); } - void startActivity(ActivityId act, ActivityType type, const std::string & s, - const Fields & fields, ActivityId parent) override + void startActivity(ActivityId act, Verbosity lvl, ActivityType type, + const std::string & s, const Fields & fields, ActivityId parent) override { + if (lvl <= verbosity && !s.empty()) + log(lvl, s + "..."); + auto state(state_.lock()); state->activities.emplace_back(ActInfo()); diff --git a/src/nix/verify.cc b/src/nix/verify.cc index 7156341396d3..4913d990097d 100644 --- a/src/nix/verify.cc +++ b/src/nix/verify.cc @@ -79,7 +79,7 @@ struct CmdVerify : StorePathsCommand try { checkInterrupt(); - Activity act2(*logger, actUnknown, fmt("checking '%s'", storePath)); + Activity act2(*logger, lvlInfo, actUnknown, fmt("checking '%s'", storePath)); MaintainCount> mcActive(active); update(); -- cgit 1.4.1