diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-10-29 17:08:23 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-10-29 17:32:12 +0100 |
commit | 4dcf66d4d00ca0b718e2b8c1ec8f56f1c0910a09 (patch) | |
tree | 9b05c3cc9dcb13235ec1ed636ad01416c40de9a4 /src/buildtool/graph_traverser/graph_traverser.hpp | |
parent | a82cfbd1b92e32e485a97fa3204f9d7afea9aef7 (diff) | |
download | justbuild-4dcf66d4d00ca0b718e2b8c1ec8f56f1c0910a09.tar.gz |
Graph traverser: fix wrong wording in trace-level message
As we write the first message about the actual upload of a blob,
we should use future rather than past tense. Also, again at trace
level, add a message of successful completion, if we succeeded.
Diffstat (limited to 'src/buildtool/graph_traverser/graph_traverser.hpp')
-rw-r--r-- | src/buildtool/graph_traverser/graph_traverser.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/buildtool/graph_traverser/graph_traverser.hpp b/src/buildtool/graph_traverser/graph_traverser.hpp index 17ec1b7a..4821e604 100644 --- a/src/buildtool/graph_traverser/graph_traverser.hpp +++ b/src/buildtool/graph_traverser/graph_traverser.hpp @@ -285,7 +285,7 @@ class GraphTraverser { context_.apis->hash_function, blob); Logger::Log(logger_, LogLevel::Trace, [&]() { return fmt::format( - "Uploaded blob {}, its digest has id {} and size {}.", + "Will upload blob {}, its digest has id {} and size {}.", nlohmann::json(blob).dump(), digest.hash(), digest.size()); @@ -305,7 +305,16 @@ class GraphTraverser { } } // Upload remaining blobs. - return context_.apis->remote->Upload(std::move(container)); + auto result = context_.apis->remote->Upload(std::move(container)); + Logger::Log(logger_, LogLevel::Trace, [&]() { + std::stringstream msg{}; + msg << (result ? "Finished" : "Failed") << " upload of\n"; + for (auto const& blob : blobs) { + msg << " - " << nlohmann::json(blob).dump() << "\n"; + } + return msg.str(); + }); + return result; } /// \brief Adds the artifacts to be retrieved to the graph |