Merge pull request #22939 from veblush/ping-log

Fix log ping format
pull/22971/head
Esun Kim 5 years ago committed by GitHub
commit c56134deeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/ext/transport/chttp2/transport/writing.cc

@ -57,7 +57,7 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) || if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) || GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) { GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
gpr_log(GPR_INFO, "%s: Ping delayed [%p]: already pinging", gpr_log(GPR_INFO, "%s: Ping delayed [%s]: already pinging",
t->is_client ? "CLIENT" : "SERVER", t->peer_string); t->is_client ? "CLIENT" : "SERVER", t->peer_string);
} }
return; return;
@ -68,7 +68,7 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) || if (GRPC_TRACE_FLAG_ENABLED(grpc_http_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) || GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) { GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
gpr_log(GPR_INFO, "%s: Ping delayed [%p]: too many recent pings: %d/%d", gpr_log(GPR_INFO, "%s: Ping delayed [%s]: too many recent pings: %d/%d",
t->is_client ? "CLIENT" : "SERVER", t->peer_string, t->is_client ? "CLIENT" : "SERVER", t->peer_string,
t->ping_state.pings_before_data_required, t->ping_state.pings_before_data_required,
t->ping_policy.max_pings_without_data); t->ping_policy.max_pings_without_data);
@ -91,7 +91,7 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) || GRPC_TRACE_FLAG_ENABLED(grpc_bdp_estimator_trace) ||
GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) { GRPC_TRACE_FLAG_ENABLED(grpc_keepalive_trace)) {
gpr_log(GPR_INFO, gpr_log(GPR_INFO,
"%s: Ping delayed [%p]: not enough time elapsed since last ping. " "%s: Ping delayed [%s]: not enough time elapsed since last ping. "
" Last ping %f: Next ping %f: Now %f", " Last ping %f: Next ping %f: Now %f",
t->is_client ? "CLIENT" : "SERVER", t->peer_string, t->is_client ? "CLIENT" : "SERVER", t->peer_string,
static_cast<double>(t->ping_state.last_ping_sent_time), static_cast<double>(t->ping_state.last_ping_sent_time),

Loading…
Cancel
Save