Add debugging logs for Priority frames.
gfe-relnote: v99 only, not in prod.
PiperOrigin-RevId: 259423115
Change-Id: I1c67ed93a229f75a8a746b3d68f24efb1f902811
diff --git a/quic/core/http/http_frames.h b/quic/core/http/http_frames.h
index ac590e6..ced2032 100644
--- a/quic/core/http/http_frames.h
+++ b/quic/core/http/http_frames.h
@@ -80,6 +80,20 @@
element_dependency_id == rhs.element_dependency_id &&
weight == rhs.weight;
}
+ std::string ToString() const {
+ return QuicStrCat("Priority Frame : {prioritized_type: ", prioritized_type,
+ ", dependency_type: ", dependency_type,
+ ", exclusive: ", exclusive,
+ ", prioritized_element_id: ", prioritized_element_id,
+ ", element_dependency_id: ", element_dependency_id,
+ ", weight: ", weight, "}");
+ }
+
+ friend QUIC_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
+ const PriorityFrame& s) {
+ os << s.ToString();
+ return os;
+ }
};
// 4.2.4. CANCEL_PUSH
diff --git a/quic/core/http/quic_send_control_stream.cc b/quic/core/http/quic_send_control_stream.cc
index a53f931..348f63d 100644
--- a/quic/core/http/quic_send_control_stream.cc
+++ b/quic/core/http/quic_send_control_stream.cc
@@ -59,6 +59,7 @@
std::unique_ptr<char[]> buffer;
QuicByteCount frame_length =
encoder_.SerializePriorityFrame(priority, &buffer);
+ QUIC_DVLOG(1) << "Control Stream " << id() << " is writing " << priority;
WriteOrBufferData(QuicStringPiece(buffer.get(), frame_length), false,
nullptr);
}