diff --git a/src/api_server.cc b/src/api_server.cc index c46575bf..7e636b83 100644 --- a/src/api_server.cc +++ b/src/api_server.cc @@ -193,7 +193,8 @@ void SendMetadataRequest(std::vector&& entries, {"entries", json::array(std::move(entries))}, }); - LOG(INFO) << "About to send request: " << *update_metadata_request; + LOG(INFO) << "About to send request: POST " << endpoint + << " " << *update_metadata_request; http::client client; http::client::request request(endpoint); @@ -292,7 +293,8 @@ void MetadataAgent::UpdateResource(const std::vector& resource_ids, << "is_deleted: " << entry.is_deleted << ", " << "created_at: " << rfc3339::ToString(entry.created_at) << ", " << "collected_at: " << rfc3339::ToString(entry.collected_at) << ", " - << "metadata: " << *entry.metadata + << "metadata: " << *entry.metadata << ", " + << "ignore: " << entry.ignore << "}"; // Force value update. The repeated search is inefficient, but shouldn't // be a huge deal. diff --git a/src/format.cc b/src/format.cc index 87f0bbc6..d1c60a13 100644 --- a/src/format.cc +++ b/src/format.cc @@ -16,7 +16,6 @@ #include "format.h" -#include #include namespace format { @@ -25,9 +24,9 @@ std::string Substitute(const std::string& format, const std::map&& params) throw(Exception) { static constexpr const char kStart[] = "{{"; - static constexpr const std::size_t kStartLen = std::strlen(kStart); + static constexpr const std::size_t kStartLen = sizeof(kStart) - 1; static constexpr const char kEnd[] = "}}"; - static constexpr const std::size_t kEndLen = std::strlen(kEnd); + static constexpr const std::size_t kEndLen = sizeof(kEnd) - 1; std::stringstream result; std::string::size_type pos = 0;