diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-05 10:04:01 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2025-06-05 11:51:47 +0200 |
commit | 937723a24ae1a972a0f218fbc08ac40652701edb (patch) | |
tree | 429d0f0f467f402843c266a28b22739cab468c16 /src | |
parent | 7bc00b40a22f8b925219dc12110693a38cba67e0 (diff) | |
download | justbuild-937723a24ae1a972a0f218fbc08ac40652701edb.tar.gz |
GitRepo: Reduce logging levels
...in methods that should not report at error level themselves,
but let this be handled by its callers.
While there, remove an unneeded path manipulation in a defferent
set of log messages.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/file_system/git_repo.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp index d5ae6e3d..aec2dc4d 100644 --- a/src/buildtool/file_system/git_repo.cpp +++ b/src/buildtool/file_system/git_repo.cpp @@ -93,7 +93,7 @@ std::unordered_set<git_filemode_t> const kNonSpecialGitFileModes{ std::ostringstream str; str << std::oct << static_cast<int>(mode); Logger::Log( - LogLevel::Error, "unsupported git filemode {}", str.str()); + LogLevel::Debug, "unsupported git filemode {}", str.str()); return std::nullopt; } } @@ -107,7 +107,7 @@ std::unordered_set<git_filemode_t> const kNonSpecialGitFileModes{ case GIT_OBJECT_TREE: return ObjectType::Tree; default: - Logger::Log(LogLevel::Error, + Logger::Log(LogLevel::Debug, "unsupported git object type {}", git_object_type2string(type)); return std::nullopt; @@ -171,7 +171,7 @@ std::unordered_set<git_filemode_t> const kNonSpecialGitFileModes{ return 1; // return >=0 on success, 1 == skip subtrees (flat) } } - Logger::Log(LogLevel::Error, + Logger::Log(LogLevel::Debug, "failed ignore_special walk for git tree entry: {}", name); return -1; // fail @@ -193,7 +193,7 @@ std::unordered_set<git_filemode_t> const kNonSpecialGitFileModes{ return 1; // return >=0 on success, 1 == skip subtrees (flat) } } - Logger::Log(LogLevel::Error, "failed walk for git tree entry: {}", name); + Logger::Log(LogLevel::Debug, "failed walk for git tree entry: {}", name); return -1; // fail } @@ -453,12 +453,12 @@ auto GitRepo::InitAndOpen(std::filesystem::path const& repo_path, } Logger::Log(LogLevel::Error, "initializing git repository {} failed with:\n{}", - (repo_path / "").string(), + repo_path.string(), err_mess); } catch (std::exception const& ex) { Logger::Log(LogLevel::Error, "initializing git repository {} failed with:\n{}", - (repo_path / "").string(), + repo_path.string(), ex.what()); } #endif // BOOTSTRAP_BUILD_TOOL @@ -1963,7 +1963,7 @@ auto GitRepo::CreateTree(tree_entries_t const& entries) const noexcept return ToRawString(oid); } catch (std::exception const& ex) { Logger::Log( - LogLevel::Error, "creating tree failed with:\n{}", ex.what()); + LogLevel::Debug, "creating tree failed with:\n{}", ex.what()); return std::nullopt; } #endif |