diff options
Diffstat (limited to 'src/buildtool/progress_reporting/progress_reporter.cpp')
-rw-r--r-- | src/buildtool/progress_reporting/progress_reporter.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/buildtool/progress_reporting/progress_reporter.cpp b/src/buildtool/progress_reporting/progress_reporter.cpp index 27960172..94280fe0 100644 --- a/src/buildtool/progress_reporting/progress_reporter.cpp +++ b/src/buildtool/progress_reporting/progress_reporter.cpp @@ -18,12 +18,12 @@ #include "fmt/core.h" #include "src/buildtool/logging/log_level.hpp" -#include "src/buildtool/logging/logger.hpp" -auto ProgressReporter::Reporter( - gsl::not_null<Statistics*> const& stats, - gsl::not_null<Progress*> const& progress) noexcept -> progress_reporter_t { - return BaseProgressReporter::Reporter([stats, progress]() { +auto ProgressReporter::Reporter(gsl::not_null<Statistics*> const& stats, + gsl::not_null<Progress*> const& progress, + Logger const* logger) noexcept + -> progress_reporter_t { + return BaseProgressReporter::Reporter([stats, progress, logger]() { int total = gsl::narrow<int>(progress->OriginMap().size()); // Note: order matters; queued has to be queried last auto const& sample = progress->TaskTracker().Sample(); @@ -53,7 +53,8 @@ auto ProgressReporter::Reporter( if (total_work > 0) { progress = run * kOneHundred / total_work; } - Logger::Log(LogLevel::Progress, + Logger::Log(logger, + LogLevel::Progress, "[{:3}%] {} cached, {} run, {} processing{}.", progress, cached, |