diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2025-05-14 19:00:46 +0200 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2025-06-24 12:55:04 +0200 |
commit | cb85f75e9c6bdfbb69edb020dc49e83f77f792b9 (patch) | |
tree | 7698743b4ec8bc44b2a78c02c92d4cad05020838 | |
parent | 9245cf6479718351f4ff21d52e688b6e870dc846 (diff) | |
download | justbuild-cb85f75e9c6bdfbb69edb020dc49e83f77f792b9.tar.gz |
LocalAction: Fix the use of external logger
-rw-r--r-- | src/buildtool/execution_api/local/local_action.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/buildtool/execution_api/local/local_action.cpp b/src/buildtool/execution_api/local/local_action.cpp index 174caf08..d9733f18 100644 --- a/src/buildtool/execution_api/local/local_action.cpp +++ b/src/buildtool/execution_api/local/local_action.cpp @@ -398,7 +398,7 @@ auto LocalAction::CollectOutputFileOrSymlink( auto file_path = exec_path / local_path; auto type = FileSystemManager::Type(file_path, /*allow_upwards=*/true); if (not type) { - Logger::Log(LogLevel::Error, "expected known type at {}", local_path); + logger_.Emit(LogLevel::Error, "expected known type at {}", local_path); return std::nullopt; } if (IsSymlinkObject(*type)) { @@ -407,7 +407,7 @@ auto LocalAction::CollectOutputFileOrSymlink( if (ProtocolTraits::IsNative( local_context_.storage->GetHashFunction().GetType()) and not PathIsNonUpwards(*content)) { - Logger::Log( + logger_.Emit( LogLevel::Error, "found invalid symlink at {}", local_path); return std::nullopt; } @@ -433,7 +433,7 @@ auto LocalAction::CollectOutputFileOrSymlink( } } else { - Logger::Log( + logger_.Emit( LogLevel::Error, "expected file or symlink at {}", local_path); } return std::nullopt; @@ -446,7 +446,7 @@ auto LocalAction::CollectOutputDirOrSymlink( auto dir_path = exec_path / local_path; auto type = FileSystemManager::Type(dir_path, /*allow_upwards=*/true); if (not type) { - Logger::Log(LogLevel::Error, "expected known type at {}", local_path); + logger_.Emit(LogLevel::Error, "expected known type at {}", local_path); return std::nullopt; } if (IsSymlinkObject(*type)) { @@ -455,7 +455,7 @@ auto LocalAction::CollectOutputDirOrSymlink( if (ProtocolTraits::IsNative( local_context_.storage->GetHashFunction().GetType()) and not PathIsNonUpwards(*content)) { - Logger::Log( + logger_.Emit( LogLevel::Error, "found invalid symlink at {}", local_path); return std::nullopt; } @@ -476,12 +476,12 @@ auto LocalAction::CollectOutputDirOrSymlink( ArtifactDigestFactory::ToBazel(*digest); return out_dir; } - Logger::Log(LogLevel::Error, - "found invalid entries in directory at {}", - local_path); + logger_.Emit(LogLevel::Error, + "found invalid entries in directory at {}", + local_path); } else { - Logger::Log( + logger_.Emit( LogLevel::Error, "expected directory or symlink at {}", local_path); } return std::nullopt; |