From 491ba8d1c45b201a2672f31f286dea845034dfbc Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 27 Nov 2020 12:17:17 +0100 Subject: [PATCH] Log fast builds/substitutions with a lower priority --- src/libstore/build/derivation-goal.cc | 4 ++-- src/libstore/build/substitution-goal.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc index 83a31a272..94c5a9034 100644 --- a/src/libstore/build/derivation-goal.cc +++ b/src/libstore/build/derivation-goal.cc @@ -1004,9 +1004,9 @@ void DerivationGoal::buildDone() auto duration = std::chrono::duration_cast(stopTime - startTime).count() / 1000.0; // FIXME: associate with activity 'act'. - notice(ANSI_BOLD ANSI_GREEN "Built" ANSI_NORMAL " '%s' in %s%.1f s" ANSI_NORMAL ".", + printMsg(duration > 0.2 ? lvlNotice : lvlInfo, + ANSI_BOLD ANSI_GREEN "Built" ANSI_NORMAL " '%s' in %.1f s.", worker.store.printStorePath(drvPath), - duration > 0.5 ? ANSI_BOLD : ANSI_NORMAL, duration); } diff --git a/src/libstore/build/substitution-goal.cc b/src/libstore/build/substitution-goal.cc index 5cff803b8..b7f2dc3db 100644 --- a/src/libstore/build/substitution-goal.cc +++ b/src/libstore/build/substitution-goal.cc @@ -288,9 +288,9 @@ void SubstitutionGoal::finished() auto duration = std::chrono::duration_cast(stopTime - startTime).count() / 1000.0; // FIXME: associate with activity 'act'. - notice(ANSI_BOLD ANSI_GREEN "Substituted" ANSI_NORMAL " '%s' in %s%.1f s" ANSI_NORMAL ".", + printMsg(duration > 0.2 ? lvlNotice : lvlInfo, + ANSI_BOLD ANSI_GREEN "Substituted" ANSI_NORMAL " '%s' in %.1f s.", worker.store.printStorePath(storePath), - duration > 0.5 ? ANSI_BOLD : ANSI_NORMAL, duration); }