diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-14 11:07:14 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-03-19 10:31:33 +0100 |
commit | 7b0a91b901ee44ef3cfae9bc9fc7de08d483e592 (patch) | |
tree | 2c8c6c1f4943e642c3d748e10f7ae3d189041178 /src/buildtool/progress_reporting/progress_reporter.cpp | |
parent | c1da694434f7df715d43c0a7c4fcff7ae23d47d8 (diff) | |
download | justbuild-7b0a91b901ee44ef3cfae9bc9fc7de08d483e592.tar.gz |
graph traverser: Be explicit in logging location
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, |