diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-06 16:21:11 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-03-07 15:10:00 +0100 |
commit | fb8fe5821664778a0beffa8161f8dc68d74dd748 (patch) | |
tree | c9202c84c3eca2c5882aaeded49e0c14675d6728 /src | |
parent | b0f5a055c83b4eee7768a2b18ec43f295a857760 (diff) | |
download | justbuild-fb8fe5821664778a0beffa8161f8dc68d74dd748.tar.gz |
Git: Move 'fake' repository log messages to more appropriate reporting level
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/file_system/git_repo.cpp | 25 | ||||
-rw-r--r-- | src/other_tools/git_operations/git_repo_remote.cpp | 8 |
2 files changed, 15 insertions, 18 deletions
diff --git a/src/buildtool/file_system/git_repo.cpp b/src/buildtool/file_system/git_repo.cpp index 994f0654..1498b229 100644 --- a/src/buildtool/file_system/git_repo.cpp +++ b/src/buildtool/file_system/git_repo.cpp @@ -653,10 +653,9 @@ auto GitRepo::GetSubtreeFromCommit(std::string const& commit, try { // preferably with a "fake" repository! if (not IsRepoFake()) { - (*logger)( - "WARNING: subtree id retrieval from commit called on a real " - "repository!\n", - false /*fatal*/); + Logger::Log( + LogLevel::Debug, + "Subtree id retrieval from commit called on a real repository"); } // get commit object git_oid commit_oid; @@ -750,10 +749,9 @@ auto GitRepo::GetSubtreeFromTree(std::string const& tree_id, if (subdir != ".") { // preferably with a "fake" repository! if (not IsRepoFake()) { - (*logger)( - "WARNING: subtree id retrieval from tree called on a real " - "repository!\n", - false /*fatal*/); + Logger::Log(LogLevel::Debug, + "Subtree id retrieval from tree called on a real " + "repository"); } // get tree object from tree id git_oid tree_oid; @@ -827,10 +825,9 @@ auto GitRepo::GetSubtreeFromPath(std::filesystem::path const& fpath, try { // preferably with a "fake" repository! if (not IsRepoFake()) { - (*logger)( - "WARNING: subtree id retrieval from path called on a real " - "repository!\n", - false /*fatal*/); + Logger::Log( + LogLevel::Debug, + "Subtree id retrieval from path called on a real repository"); } // setup wrapped logger auto wrapped_logger = std::make_shared<anon_logger_t>( @@ -875,8 +872,8 @@ auto GitRepo::CheckCommitExists(std::string const& commit, try { // preferably with a "fake" repository! if (not IsRepoFake()) { - (*logger)("WARNING: commit lookup called on a real repository!\n", - false /*fatal*/); + Logger::Log(LogLevel::Debug, + "Commit lookup called on a real repository"); } // lookup commit in current repo state git_oid commit_oid; diff --git a/src/other_tools/git_operations/git_repo_remote.cpp b/src/other_tools/git_operations/git_repo_remote.cpp index 557d381b..4965f121 100644 --- a/src/other_tools/git_operations/git_repo_remote.cpp +++ b/src/other_tools/git_operations/git_repo_remote.cpp @@ -378,8 +378,8 @@ auto GitRepoRemote::UpdateCommitViaTmpRepo( try { // preferably with a "fake" repository! if (not IsRepoFake()) { - (*logger)("WARNING: commit update called on a real repository!\n", - false /*fatal*/); + Logger::Log(LogLevel::Debug, + "Commit update called on a real repository"); } // create the temporary real repository auto tmp_repo = @@ -422,8 +422,8 @@ auto GitRepoRemote::FetchViaTmpRepo(std::filesystem::path const& tmp_repo_path, try { // preferably with a "fake" repository! if (not IsRepoFake()) { - (*logger)("WARNING: branch fetch called on a real repository!\n", - false /*fatal*/); + Logger::Log(LogLevel::Debug, + "Branch fetch called on a real repository"); } // create the temporary real repository // it can be bare, as the refspecs for this fetch will be given |