Use QUICHE_*LOG() in Balsa.
PiperOrigin-RevId: 444951690
diff --git a/quiche/common/balsa/balsa_frame.cc b/quiche/common/balsa/balsa_frame.cc
index c50e16d..5f9d9d2 100644
--- a/quiche/common/balsa/balsa_frame.cc
+++ b/quiche/common/balsa/balsa_frame.cc
@@ -473,7 +473,7 @@
if (value_begin >= line_end) {
// There is no non-whitespace value data.
- DVLOG(1) << "invalid content-length -- no non-whitespace value data";
+ QUICHE_DVLOG(1) << "invalid content-length -- no non-whitespace value data";
return BalsaHeadersEnums::INVALID_CONTENT_LENGTH;
}
@@ -481,7 +481,8 @@
while (value_begin < line_end) {
if (*value_begin < '0' || *value_begin > '9') {
// bad! content-length found, and couldn't parse all of it!
- DVLOG(1) << "invalid content-length - non numeric character detected";
+ QUICHE_DVLOG(1)
+ << "invalid content-length - non numeric character detected";
return BalsaHeadersEnums::INVALID_CONTENT_LENGTH;
}
const size_t kMaxDiv10 = std::numeric_limits<size_t>::max() / 10;
@@ -489,13 +490,13 @@
const char c = *value_begin - '0';
if (*length > kMaxDiv10 ||
(std::numeric_limits<size_t>::max() - length_x_10) < c) {
- DVLOG(1) << "content-length overflow";
+ QUICHE_DVLOG(1) << "content-length overflow";
return BalsaHeadersEnums::CONTENT_LENGTH_OVERFLOW;
}
*length = length_x_10 + c;
++value_begin;
}
- DVLOG(1) << "content_length parsed: " << *length;
+ QUICHE_DVLOG(1) << "content_length parsed: " << *length;
return BalsaHeadersEnums::VALID_CONTENT_LENGTH;
}
@@ -543,7 +544,7 @@
void BalsaFrame::ProcessHeaderLines(const Lines& lines, bool is_trailer,
BalsaHeaders* headers) {
QUICHE_DCHECK(!lines.empty());
- DVLOG(1) << "******@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**********\n";
+ QUICHE_DVLOG(1) << "******@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@**********\n";
if (is_request() && track_invalid_chars()) {
if (CheckHeaderLinesForInvalidChars(lines, headers)) {
@@ -584,7 +585,7 @@
const HeaderLineDescription& line = headers->header_lines_[i];
const absl::string_view key(stream_begin + line.first_char_idx,
line.key_end_idx - line.first_char_idx);
- DVLOG(2) << "[" << i << "]: " << key << " key_len: " << key.length();
+ QUICHE_DVLOG(2) << "[" << i << "]: " << key << " key_len: " << key.length();
// If a header begins with either lowercase or uppercase 'c' or 't', then
// the header may be one of content-length, connection, content-encoding
@@ -718,8 +719,9 @@
// intended to be executed, and should technically be impossible.
// COV_NF_START
default:
- LOG(FATAL) << "Saw a content_length_status: "
- << headers_->content_length_status_ << " which is unknown.";
+ QUICHE_LOG(FATAL) << "Saw a content_length_status: "
+ << headers_->content_length_status_
+ << " which is unknown.";
// COV_NF_END
}
}
@@ -773,8 +775,9 @@
checkpoint = message_current + 1;
const char* begin = headers_->OriginalHeaderStreamBegin();
- DVLOG(1) << "First line " << std::string(begin, lines_[0].second);
- DVLOG(1) << "is_request_: " << is_request_;
+ QUICHE_DVLOG(1) << "First line "
+ << std::string(begin, lines_[0].second);
+ QUICHE_DVLOG(1) << "is_request_: " << is_request_;
ProcessFirstLine(begin, begin + lines_[0].second);
if (parse_state_ == BalsaFrameEnums::MESSAGE_FULLY_READ) {
break;
@@ -1295,8 +1298,8 @@
// The state-machine should never be in a state that isn't handled
// above. This is a glaring logic error, and we should do something
// drastic to ensure that this gets looked-at and fixed.
- LOG(FATAL) << "Unknown state: " << parse_state_ // COV_NF_LINE
- << " memory corruption?!"; // COV_NF_LINE
+ QUICHE_LOG(FATAL) << "Unknown state: " << parse_state_ // COV_NF_LINE
+ << " memory corruption?!"; // COV_NF_LINE
}
}
}
diff --git a/quiche/common/balsa/balsa_headers.cc b/quiche/common/balsa/balsa_headers.cc
index 469d23f..d96b5a8 100644
--- a/quiche/common/balsa/balsa_headers.cc
+++ b/quiche/common/balsa/balsa_headers.cc
@@ -1059,8 +1059,9 @@
BalsaHeaders::HeaderLines::iterator it =
GetHeaderLinesIterator(key, header_lines_.begin());
if (it == header_lines_.end()) {
- DLOG(WARNING) << "Attempting to remove last token from a non-existent "
- << "header \"" << key << "\"";
+ QUICHE_DLOG(WARNING)
+ << "Attempting to remove last token from a non-existent "
+ << "header \"" << key << "\"";
return;
}
@@ -1082,8 +1083,9 @@
ParseTokenList(value, &tokens);
if (tokens.empty()) {
- DLOG(WARNING) << "Attempting to remove a token from an empty header value "
- << "for header \"" << key << "\"";
+ QUICHE_DLOG(WARNING)
+ << "Attempting to remove a token from an empty header value "
+ << "for header \"" << key << "\"";
header_line->skip = true; // remove the whole line
} else if (tokens.size() == 1) {
header_line->skip = true; // remove the whole line