Skip to content

Commit

Permalink
[remoting] Reduce HeartbeatSender log verbosity
Browse files Browse the repository at this point in the history
Previously HeartbeatSender logs a bunch of stuff like sequence ID and
signature, which are not very useful now and spams the log. This CL
reduces the verbosity of the log to just log JID and FTL ID.

Bug: 969199
Change-Id: Id32e1aaab611793a0943eb359bec7439343d45d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1639365
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Auto-Submit: Yuwei Huang <yuweih@chromium.org>
Reviewed-by: Jamie Walch <jamiewalch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665352}
  • Loading branch information
ywh233 authored and Commit Bot committed May 31, 2019
1 parent 9772e48 commit c7496f1
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions remoting/host/heartbeat_sender.cc
Expand Up @@ -105,17 +105,14 @@ HeartbeatSender::HeartbeatClient::~HeartbeatClient() = default;
void HeartbeatSender::HeartbeatClient::Heartbeat(
const apis::v1::HeartbeatRequest& request,
HeartbeatResponseCallback callback) {
HOST_LOG << "Sending outgoing heartbeat:\n"
<< "signature: " << request.signature() << "\n"
<< "host_id: " << request.host_id() << "\n"
<< "jabber_id: " << request.jabber_id() << "\n"
<< "tachyon_id: " << request.tachyon_id() << "\n"
<< "sequence_id: " << request.sequence_id() << "\n"
<< "host_version: " << request.host_version() << "\n"
<< "host_offline_reason: " << request.host_offline_reason() << "\n"
<< "host_os_name: " << request.host_os_name() << "\n"
<< "host_os_version: " << request.host_os_version() << "\n"
<< "=========================================================";
std::string host_offline_reason_or_empty_log =
request.has_host_offline_reason()
? (", host_offline_reason: " + request.host_offline_reason())
: "";
HOST_LOG << "Sending outgoing heartbeat."
<< " jabber_id: " << request.jabber_id()
<< ", tachyon_id: " << request.tachyon_id()
<< host_offline_reason_or_empty_log;

auto client_context = std::make_unique<grpc::ClientContext>();
auto async_request = CreateGrpcAsyncUnaryRequest(
Expand Down

0 comments on commit c7496f1

Please sign in to comment.