Fix QuicSession logging of DATAGRAM frames

Since these frames can contain arbitrary binary data,
logging them without hex formatting can send ASCII control
codes to the terminal which isn't great.

This only impacts debug code, so doesn't require flag protection.

PiperOrigin-RevId: 360229897
Change-Id: Ic9c4926913f5e59f2a1e1770a8fdd98adf9d07f0
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index e3b0408..bdc9ef5 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -25,6 +25,7 @@
 #include "quic/platform/api/quic_ptr_util.h"
 #include "quic/platform/api/quic_server_stats.h"
 #include "quic/platform/api/quic_stack_trace.h"
+#include "common/platform/api/quiche_text_utils.h"
 
 using spdy::SpdyPriority;
 
@@ -368,8 +369,11 @@
 }
 
 void QuicSession::OnMessageReceived(absl::string_view message) {
-  QUIC_DVLOG(1) << ENDPOINT << "Received message, length: " << message.length()
-                << ", " << message;
+  QUIC_DVLOG(1) << ENDPOINT << "Received message of length "
+                << message.length();
+  QUIC_DVLOG(2) << ENDPOINT << "Contents of message of length "
+                << message.length() << ":" << std::endl
+                << quiche::QuicheTextUtils::HexDump(message);
 }
 
 void QuicSession::OnHandshakeDoneReceived() {