diff --git a/src/core/ext/filters/http/message_compress/compression_filter.cc b/src/core/ext/filters/http/message_compress/compression_filter.cc index cfd1d2aa8ce..33491f1e6c4 100644 --- a/src/core/ext/filters/http/message_compress/compression_filter.cc +++ b/src/core/ext/filters/http/message_compress/compression_filter.cc @@ -142,9 +142,10 @@ MessageHandle ChannelCompression::CompressMessage( const float savings_ratio = 1.0f - static_cast(after_size) / static_cast(before_size); CHECK(grpc_compression_algorithm_name(algorithm, &algo_name)); - LOG(INFO) << "Compressed[" << algo_name << "] " << before_size - << " bytes vs. " << after_size << " bytes (" - << 100 * savings_ratio << "% savings)"; + LOG(INFO) << absl::StrFormat( + "Compressed[%s] %" PRIuPTR " bytes vs. %" PRIuPTR + " bytes (%.2f%% savings)", + algo_name, before_size, after_size, 100 * savings_ratio); } tmp.Swap(payload); flags |= GRPC_WRITE_INTERNAL_COMPRESS;