Replaces all flavors of SPDY_LOG with the QUICHE equivalents.
PiperOrigin-RevId: 367497148
Change-Id: I5a7092649df7d919d23bc80a3cd1f4002472fa22
diff --git a/spdy/core/hpack/hpack_constants.cc b/spdy/core/hpack/hpack_constants.cc
index 231fd54..a8e48a2 100644
--- a/spdy/core/hpack/hpack_constants.cc
+++ b/spdy/core/hpack/hpack_constants.cc
@@ -9,8 +9,8 @@
#include <vector>
#include "absl/base/macros.h"
+#include "common/platform/api/quiche_logging.h"
#include "spdy/core/hpack/hpack_static_table.h"
-#include "spdy/platform/api/spdy_logging.h"
namespace spdy {
diff --git a/spdy/core/hpack/hpack_decoder_adapter.cc b/spdy/core/hpack/hpack_decoder_adapter.cc
index 4d03cc5..eed658b 100644
--- a/spdy/core/hpack/hpack_decoder_adapter.cc
+++ b/spdy/core/hpack/hpack_decoder_adapter.cc
@@ -6,9 +6,9 @@
#include "http2/decoder/decode_buffer.h"
#include "http2/decoder/decode_status.h"
+#include "common/platform/api/quiche_logging.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
#include "spdy/platform/api/spdy_flags.h"
-#include "spdy/platform/api/spdy_logging.h"
using ::http2::DecodeBuffer;
@@ -27,13 +27,13 @@
HpackDecoderAdapter::~HpackDecoderAdapter() = default;
void HpackDecoderAdapter::ApplyHeaderTableSizeSetting(size_t size_setting) {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::ApplyHeaderTableSizeSetting";
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::ApplyHeaderTableSizeSetting";
hpack_decoder_.ApplyHeaderTableSizeSetting(size_setting);
}
void HpackDecoderAdapter::HandleControlFrameHeadersStart(
SpdyHeadersHandlerInterface* handler) {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::HandleControlFrameHeadersStart";
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::HandleControlFrameHeadersStart";
QUICHE_DCHECK(!header_block_started_);
listener_adapter_.set_handler(handler);
}
@@ -41,8 +41,8 @@
bool HpackDecoderAdapter::HandleControlFrameHeadersData(
const char* headers_data,
size_t headers_data_length) {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::HandleControlFrameHeadersData: len="
- << headers_data_length;
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::HandleControlFrameHeadersData: len="
+ << headers_data_length;
if (!header_block_started_) {
// Initialize the decoding process here rather than in
// HandleControlFrameHeadersStart because that method is not always called.
@@ -61,9 +61,9 @@
if (headers_data_length > 0) {
QUICHE_DCHECK_NE(headers_data, nullptr);
if (headers_data_length > max_decode_buffer_size_bytes_) {
- SPDY_DVLOG(1) << "max_decode_buffer_size_bytes_ < headers_data_length: "
- << max_decode_buffer_size_bytes_ << " < "
- << headers_data_length;
+ QUICHE_DVLOG(1) << "max_decode_buffer_size_bytes_ < headers_data_length: "
+ << max_decode_buffer_size_bytes_ << " < "
+ << headers_data_length;
error_ = http2::HpackDecodingError::kFragmentTooLong;
detailed_error_ = "";
return false;
@@ -89,12 +89,12 @@
bool HpackDecoderAdapter::HandleControlFrameHeadersComplete(
size_t* compressed_len) {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::HandleControlFrameHeadersComplete";
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::HandleControlFrameHeadersComplete";
if (compressed_len != nullptr) {
*compressed_len = listener_adapter_.total_hpack_bytes();
}
if (!hpack_decoder_.EndDecodingBlock()) {
- SPDY_DVLOG(3) << "EndDecodingBlock returned false";
+ QUICHE_DVLOG(3) << "EndDecodingBlock returned false";
error_ = hpack_decoder_.error();
detailed_error_ = hpack_decoder_.detailed_error();
return false;
@@ -109,7 +109,7 @@
void HpackDecoderAdapter::set_max_decode_buffer_size_bytes(
size_t max_decode_buffer_size_bytes) {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::set_max_decode_buffer_size_bytes";
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::set_max_decode_buffer_size_bytes";
max_decode_buffer_size_bytes_ = max_decode_buffer_size_bytes;
hpack_decoder_.set_max_string_size_bytes(max_decode_buffer_size_bytes);
}
@@ -132,7 +132,7 @@
}
void HpackDecoderAdapter::ListenerAdapter::OnHeaderListStart() {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::ListenerAdapter::OnHeaderListStart";
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::ListenerAdapter::OnHeaderListStart";
total_hpack_bytes_ = 0;
total_uncompressed_bytes_ = 0;
decoded_block_.clear();
@@ -143,20 +143,20 @@
void HpackDecoderAdapter::ListenerAdapter::OnHeader(const std::string& name,
const std::string& value) {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::ListenerAdapter::OnHeader:\n name: "
- << name << "\n value: " << value;
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::ListenerAdapter::OnHeader:\n name: "
+ << name << "\n value: " << value;
total_uncompressed_bytes_ += name.size() + value.size();
if (handler_ == nullptr) {
- SPDY_DVLOG(3) << "Adding to decoded_block";
+ QUICHE_DVLOG(3) << "Adding to decoded_block";
decoded_block_.AppendValueOrAddHeader(name, value);
} else {
- SPDY_DVLOG(3) << "Passing to handler";
+ QUICHE_DVLOG(3) << "Passing to handler";
handler_->OnHeader(name, value);
}
}
void HpackDecoderAdapter::ListenerAdapter::OnHeaderListEnd() {
- SPDY_DVLOG(2) << "HpackDecoderAdapter::ListenerAdapter::OnHeaderListEnd";
+ QUICHE_DVLOG(2) << "HpackDecoderAdapter::ListenerAdapter::OnHeaderListEnd";
// We don't clear the SpdyHeaderBlock here to allow access to it until the
// next HPACK block is decoded.
if (handler_ != nullptr) {
@@ -167,7 +167,7 @@
void HpackDecoderAdapter::ListenerAdapter::OnHeaderErrorDetected(
absl::string_view error_message) {
- SPDY_VLOG(1) << error_message;
+ QUICHE_VLOG(1) << error_message;
}
} // namespace spdy
diff --git a/spdy/core/hpack/hpack_decoder_adapter_test.cc b/spdy/core/hpack/hpack_decoder_adapter_test.cc
index 0a12fe4..44597ef 100644
--- a/spdy/core/hpack/hpack_decoder_adapter_test.cc
+++ b/spdy/core/hpack/hpack_decoder_adapter_test.cc
@@ -18,13 +18,13 @@
#include "http2/hpack/decoder/hpack_decoder_tables.h"
#include "http2/hpack/tools/hpack_block_builder.h"
#include "http2/test_tools/http2_random.h"
+#include "common/platform/api/quiche_logging.h"
#include "common/platform/api/quiche_test.h"
#include "spdy/core/hpack/hpack_constants.h"
#include "spdy/core/hpack/hpack_encoder.h"
#include "spdy/core/hpack/hpack_output_stream.h"
#include "spdy/core/recording_headers_handler.h"
#include "spdy/core/spdy_test_utils.h"
-#include "spdy/platform/api/spdy_logging.h"
#include "spdy/platform/api/spdy_string_utils.h"
using ::http2::HpackEntryType;
@@ -134,7 +134,7 @@
}
bool HandleControlFrameHeadersData(absl::string_view str) {
- SPDY_VLOG(3) << "HandleControlFrameHeadersData:\n" << SpdyHexDump(str);
+ QUICHE_VLOG(3) << "HandleControlFrameHeadersData:\n" << SpdyHexDump(str);
bytes_passed_in_ += str.size();
return decoder_.HandleControlFrameHeadersData(str.data(), str.size());
}
diff --git a/spdy/core/hpack/hpack_encoder.cc b/spdy/core/hpack/hpack_encoder.cc
index 4c2907b..3fa453a 100644
--- a/spdy/core/hpack/hpack_encoder.cc
+++ b/spdy/core/hpack/hpack_encoder.cc
@@ -10,13 +10,13 @@
#include "http2/hpack/huffman/hpack_huffman_encoder.h"
#include "common/platform/api/quiche_bug_tracker.h"
+#include "common/platform/api/quiche_logging.h"
#include "spdy/core/hpack/hpack_constants.h"
#include "spdy/core/hpack/hpack_header_table.h"
#include "spdy/core/hpack/hpack_output_stream.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
#include "spdy/platform/api/spdy_flag_utils.h"
#include "spdy/platform/api/spdy_flags.h"
-#include "spdy/platform/api/spdy_logging.h"
namespace spdy {
@@ -156,14 +156,14 @@
}
void HpackEncoder::EmitIndex(size_t index) {
- SPDY_DVLOG(2) << "Emitting index " << index;
+ QUICHE_DVLOG(2) << "Emitting index " << index;
output_stream_.AppendPrefix(kIndexedOpcode);
output_stream_.AppendUint32(index);
}
void HpackEncoder::EmitIndexedLiteral(const Representation& representation) {
- SPDY_DVLOG(2) << "Emitting indexed literal: (" << representation.first << ", "
- << representation.second << ")";
+ QUICHE_DVLOG(2) << "Emitting indexed literal: (" << representation.first
+ << ", " << representation.second << ")";
output_stream_.AppendPrefix(kLiteralIncrementalIndexOpcode);
EmitLiteral(representation);
header_table_.TryAddEntry(representation.first, representation.second);
@@ -171,8 +171,8 @@
void HpackEncoder::EmitNonIndexedLiteral(const Representation& representation,
bool enable_compression) {
- SPDY_DVLOG(2) << "Emitting nonindexed literal: (" << representation.first
- << ", " << representation.second << ")";
+ QUICHE_DVLOG(2) << "Emitting nonindexed literal: (" << representation.first
+ << ", " << representation.second << ")";
output_stream_.AppendPrefix(kLiteralNoIndexOpcode);
size_t name_index = header_table_.GetByName(representation.first);
if (enable_compression && name_index != kHpackEntryNotFound) {
@@ -199,13 +199,13 @@
size_t encoded_size =
enable_compression_ ? http2::HuffmanSize(str) : str.size();
if (encoded_size < str.size()) {
- SPDY_DVLOG(2) << "Emitted Huffman-encoded string of length "
- << encoded_size;
+ QUICHE_DVLOG(2) << "Emitted Huffman-encoded string of length "
+ << encoded_size;
output_stream_.AppendPrefix(kStringLiteralHuffmanEncoded);
output_stream_.AppendUint32(encoded_size);
http2::HuffmanEncodeFast(str, encoded_size, output_stream_.MutableString());
} else {
- SPDY_DVLOG(2) << "Emitted literal string of length " << str.size();
+ QUICHE_DVLOG(2) << "Emitted literal string of length " << str.size();
output_stream_.AppendPrefix(kStringLiteralIdentityEncoded);
output_stream_.AppendUint32(str.size());
output_stream_.AppendBytes(str);
@@ -217,9 +217,9 @@
return;
}
const size_t current_size = CurrentHeaderTableSizeSetting();
- SPDY_DVLOG(1) << "MaybeEmitTableSize current_size=" << current_size;
- SPDY_DVLOG(1) << "MaybeEmitTableSize min_table_size_setting_received_="
- << min_table_size_setting_received_;
+ QUICHE_DVLOG(1) << "MaybeEmitTableSize current_size=" << current_size;
+ QUICHE_DVLOG(1) << "MaybeEmitTableSize min_table_size_setting_received_="
+ << min_table_size_setting_received_;
if (min_table_size_setting_received_ < current_size) {
output_stream_.AppendPrefix(kHeaderTableSizeUpdateOpcode);
output_stream_.AppendUint32(min_table_size_setting_received_);
diff --git a/spdy/core/hpack/hpack_entry.cc b/spdy/core/hpack/hpack_entry.cc
index b8350df..4deb0df 100644
--- a/spdy/core/hpack/hpack_entry.cc
+++ b/spdy/core/hpack/hpack_entry.cc
@@ -6,7 +6,6 @@
#include "absl/strings/str_cat.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
-#include "spdy/platform/api/spdy_logging.h"
namespace spdy {
diff --git a/spdy/core/hpack/hpack_header_table.cc b/spdy/core/hpack/hpack_header_table.cc
index ec69d47..8536a85 100644
--- a/spdy/core/hpack/hpack_header_table.cc
+++ b/spdy/core/hpack/hpack_header_table.cc
@@ -6,10 +6,10 @@
#include <algorithm>
+#include "common/platform/api/quiche_logging.h"
#include "spdy/core/hpack/hpack_constants.h"
#include "spdy/core/hpack/hpack_static_table.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
-#include "spdy/platform/api/spdy_logging.h"
namespace spdy {
@@ -155,9 +155,9 @@
if (!index_result.second) {
// An entry with the same name and value already exists in the dynamic
// index. We should replace it with the newly added entry.
- SPDY_DVLOG(1) << "Found existing entry at: " << index_result.first->second
- << " replacing with: " << new_entry->GetDebugString()
- << " at: " << index;
+ QUICHE_DVLOG(1) << "Found existing entry at: " << index_result.first->second
+ << " replacing with: " << new_entry->GetDebugString()
+ << " at: " << index;
QUICHE_DCHECK_GT(index, index_result.first->second);
dynamic_index_.erase(index_result.first);
auto insert_result = dynamic_index_.insert(std::make_pair(
@@ -170,9 +170,9 @@
if (!name_result.second) {
// An entry with the same name already exists in the dynamic index. We
// should replace it with the newly added entry.
- SPDY_DVLOG(1) << "Found existing entry at: " << name_result.first->second
- << " replacing with: " << new_entry->GetDebugString()
- << " at: " << index;
+ QUICHE_DVLOG(1) << "Found existing entry at: " << name_result.first->second
+ << " replacing with: " << new_entry->GetDebugString()
+ << " at: " << index;
QUICHE_DCHECK_GT(index, name_result.first->second);
dynamic_name_index_.erase(name_result.first);
auto insert_result =
diff --git a/spdy/core/hpack/hpack_output_stream.cc b/spdy/core/hpack/hpack_output_stream.cc
index d2ec46c..7b92568 100644
--- a/spdy/core/hpack/hpack_output_stream.cc
+++ b/spdy/core/hpack/hpack_output_stream.cc
@@ -6,8 +6,8 @@
#include <utility>
+#include "common/platform/api/quiche_logging.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
-#include "spdy/platform/api/spdy_logging.h"
namespace spdy {
diff --git a/spdy/core/hpack/hpack_static_table.cc b/spdy/core/hpack/hpack_static_table.cc
index 8c8248c..7594943 100644
--- a/spdy/core/hpack/hpack_static_table.cc
+++ b/spdy/core/hpack/hpack_static_table.cc
@@ -5,10 +5,10 @@
#include "spdy/core/hpack/hpack_static_table.h"
#include "absl/strings/string_view.h"
+#include "common/platform/api/quiche_logging.h"
#include "spdy/core/hpack/hpack_constants.h"
#include "spdy/core/hpack/hpack_entry.h"
#include "spdy/platform/api/spdy_estimate_memory_usage.h"
-#include "spdy/platform/api/spdy_logging.h"
namespace spdy {