summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/buildtool/file_system/file_root.hpp3
-rw-r--r--src/buildtool/file_system/file_system_manager.hpp9
-rw-r--r--src/buildtool/main/add_to_cas.cpp3
3 files changed, 9 insertions, 6 deletions
diff --git a/src/buildtool/file_system/file_root.hpp b/src/buildtool/file_system/file_root.hpp
index 68ca7533..45f74b3c 100644
--- a/src/buildtool/file_system/file_root.hpp
+++ b/src/buildtool/file_system/file_root.hpp
@@ -539,7 +539,8 @@ class FileRoot {
return true;
},
/*allow_upwards=*/false,
- ignore_special_)) {
+ ignore_special_,
+ /*log_failure_at=*/LogLevel::Warning)) {
return DirectoryEntries{std::move(map)};
}
}
diff --git a/src/buildtool/file_system/file_system_manager.hpp b/src/buildtool/file_system/file_system_manager.hpp
index aa151b7a..3617ab21 100644
--- a/src/buildtool/file_system/file_system_manager.hpp
+++ b/src/buildtool/file_system/file_system_manager.hpp
@@ -745,7 +745,8 @@ class FileSystemManager {
std::filesystem::path const& dir,
ReadDirEntryFunc const& read_entry,
bool allow_upwards = false,
- bool ignore_special = false) noexcept -> bool {
+ bool ignore_special = false,
+ LogLevel log_failure_at = LogLevel::Debug) noexcept -> bool {
try {
for (auto const& entry : std::filesystem::directory_iterator{dir}) {
ObjectType type{};
@@ -775,7 +776,7 @@ class FileSystemManager {
}
else {
Logger::Log(
- LogLevel::Error,
+ log_failure_at,
"unsupported upwards symlink dir entry {}",
entry.path().string());
return false;
@@ -786,7 +787,7 @@ class FileSystemManager {
}
}
else {
- Logger::Log(LogLevel::Error,
+ Logger::Log(log_failure_at,
"unsupported type for dir entry {}",
entry.path().string());
return false;
@@ -797,7 +798,7 @@ class FileSystemManager {
}
} catch (std::exception const& ex) {
Logger::Log(
- LogLevel::Error, "reading directory {} failed", dir.string());
+ log_failure_at, "reading directory {} failed", dir.string());
return false;
}
return true;
diff --git a/src/buildtool/main/add_to_cas.cpp b/src/buildtool/main/add_to_cas.cpp
index 163fa4c3..b9658950 100644
--- a/src/buildtool/main/add_to_cas.cpp
+++ b/src/buildtool/main/add_to_cas.cpp
@@ -310,7 +310,8 @@ class CASTreeImporter final {
dir_reader,
/*allow_upwards=*/true,
/*ignore_special=*/resolve_special_ ==
- ResolveSpecial::Ignore)) {
+ ResolveSpecial::Ignore,
+ /*log_failure_at=*/LogLevel::Error)) {
if (auto tree = GitRepo::CreateShallowTree(entries)) {
// store tree
return store_tree_(tree->second);