summaryrefslogtreecommitdiff
path: root/src/buildtool/main/build_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/main/build_utils.cpp')
-rw-r--r--src/buildtool/main/build_utils.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/buildtool/main/build_utils.cpp b/src/buildtool/main/build_utils.cpp
index b29ff0c5..fb60ea15 100644
--- a/src/buildtool/main/build_utils.cpp
+++ b/src/buildtool/main/build_utils.cpp
@@ -160,7 +160,7 @@ void WriteTargetCacheEntries(
TargetCacheWriteStrategy strategy,
TargetCache<true> const& tc,
Logger const* logger,
- bool strict_logging) {
+ LogLevel log_level) {
if (strategy == TargetCacheWriteStrategy::Disable) {
return;
}
@@ -186,12 +186,11 @@ void WriteTargetCacheEntries(
&ts,
cache_targets_ids,
[]([[maybe_unused]] auto _) {}, // map doesn't set anything
- [&failed, logger, strict_logging](auto const& msg, bool fatal) {
- Logger::Log(
- logger,
- strict_logging ? LogLevel::Error : LogLevel::Warning,
- "While writing target cache entries:\n{}",
- msg);
+ [&failed, logger, log_level](auto const& msg, bool fatal) {
+ Logger::Log(logger,
+ log_level,
+ "While writing target cache entries:\n{}",
+ msg);
failed = failed or fatal;
});
}
@@ -201,9 +200,7 @@ void WriteTargetCacheEntries(
}
if (auto error = DetectAndReportCycle(
"writing cache targets", tc_writer_map, kObjectInfoPrinter)) {
- Logger::Log(logger,
- strict_logging ? LogLevel::Error : LogLevel::Warning,
- *error);
+ Logger::Log(logger, log_level, *error);
return;
}