From 7b0a91b901ee44ef3cfae9bc9fc7de08d483e592 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 14 Mar 2024 11:07:14 +0100 Subject: graph traverser: Be explicit in logging location --- src/buildtool/progress_reporting/progress_reporter.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/buildtool/progress_reporting/progress_reporter.cpp') 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 const& stats, - gsl::not_null const& progress) noexcept -> progress_reporter_t { - return BaseProgressReporter::Reporter([stats, progress]() { +auto ProgressReporter::Reporter(gsl::not_null const& stats, + gsl::not_null const& progress, + Logger const* logger) noexcept + -> progress_reporter_t { + return BaseProgressReporter::Reporter([stats, progress, logger]() { int total = gsl::narrow(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, -- cgit v1.2.3