Skip to content
This repository was archived by the owner on Aug 19, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/api_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ void SendMetadataRequest(std::vector<json::value>&& 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);
Expand Down Expand Up @@ -292,7 +293,8 @@ void MetadataAgent::UpdateResource(const std::vector<std::string>& 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.
Expand Down
5 changes: 2 additions & 3 deletions src/format.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

#include "format.h"

#include <cstring>
#include <sstream>

namespace format {
Expand All @@ -25,9 +24,9 @@ std::string Substitute(const std::string& format,
const std::map<std::string, std::string>&& 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;
Expand Down