diff --git a/quiche/http2/adapter/oghttp2_session.cc b/quiche/http2/adapter/oghttp2_session.cc
index 7c4fabf..c124f2b 100644
--- a/quiche/http2/adapter/oghttp2_session.cc
+++ b/quiche/http2/adapter/oghttp2_session.cc
@@ -204,7 +204,7 @@
     OgHttp2Session& session, Http2VisitorInterface& visitor)
     : session_(session), visitor_(visitor) {
   if (session_.options_.validate_http_headers) {
-    QUICHE_VLOG(2) << "instantiating regular header validator";
+    QUICHE_VLOG(3) << "instantiating regular header validator";
     validator_ = std::make_unique<HeaderValidator>();
     if (session_.options_.validate_path) {
       validator_->SetValidatePath();
@@ -216,7 +216,7 @@
       validator_->SetAllowDifferentHostAndAuthority();
     }
   } else {
-    QUICHE_VLOG(2) << "instantiating noop header validator";
+    QUICHE_VLOG(3) << "instantiating noop header validator";
     validator_ = std::make_unique<NoopHeaderValidator>();
   }
 }
@@ -225,8 +225,8 @@
   Reset();
   const bool status = visitor_.OnBeginHeadersForStream(stream_id_);
   if (!status) {
-    QUICHE_VLOG(1)
-        << "Visitor rejected header block, returning HEADER_CONNECTION_ERROR";
+    QUICHE_VLOG(1) << "Visitor rejected header block for stream " << stream_id_
+                   << ", returning HEADER_CONNECTION_ERROR";
     SetResult(OnHeaderResult::HEADER_CONNECTION_ERROR);
   }
   validator_->StartHeaderBlock();
@@ -248,7 +248,7 @@
 void OgHttp2Session::PassthroughHeadersHandler::OnHeader(
     absl::string_view key, absl::string_view value) {
   if (error_encountered_) {
-    QUICHE_VLOG(2) << "Early return; status not HEADER_OK";
+    QUICHE_VLOG(3) << "Early return; status not HEADER_OK";
     return;
   }
   const HeaderValidator::HeaderStatus validation_result =
@@ -257,7 +257,7 @@
     return;
   }
   if (validation_result != HeaderValidator::HEADER_OK) {
-    QUICHE_VLOG(2) << "Header validation failed with result "
+    QUICHE_VLOG(3) << "Header validation failed with result "
                    << static_cast<int>(validation_result);
     SetResult(InterpretHeaderStatus(validation_result));
     return;
@@ -469,7 +469,7 @@
 }
 
 int64_t OgHttp2Session::ProcessBytes(absl::string_view bytes) {
-  QUICHE_VLOG(2) << TracePerspectiveAsString(options_.perspective)
+  QUICHE_VLOG(3) << TracePerspectiveAsString(options_.perspective)
                  << " processing [" << absl::CEscape(bytes) << "]";
   return absl::visit(ProcessBytesResultVisitor(), ProcessBytesImpl(bytes));
 }
@@ -477,7 +477,7 @@
 absl::variant<int64_t, OgHttp2Session::ProcessBytesError>
 OgHttp2Session::ProcessBytesImpl(absl::string_view bytes) {
   if (processing_bytes_) {
-    QUICHE_VLOG(1) << "Returning early; already processing bytes.";
+    QUICHE_VLOG(2) << "Returning early; already processing bytes.";
     return 0;
   }
   processing_bytes_ = true;
@@ -489,7 +489,7 @@
 
   int64_t preface_consumed = 0;
   if (!remaining_preface_.empty()) {
-    QUICHE_VLOG(2) << "Preface bytes remaining: " << remaining_preface_.size();
+    QUICHE_VLOG(3) << "Preface bytes remaining: " << remaining_preface_.size();
     // decoder_ does not understand the client connection preface.
     size_t min_size = std::min(remaining_preface_.size(), bytes.size());
     if (!absl::StartsWith(remaining_preface_, bytes.substr(0, min_size))) {
@@ -504,21 +504,21 @@
     remaining_preface_.remove_prefix(min_size);
     bytes.remove_prefix(min_size);
     if (!remaining_preface_.empty()) {
-      QUICHE_VLOG(2) << "Preface bytes remaining: "
+      QUICHE_VLOG(3) << "Preface bytes remaining: "
                      << remaining_preface_.size();
       return static_cast<int64_t>(min_size);
     }
     preface_consumed = min_size;
   }
   int64_t result = decoder_.ProcessInput(bytes.data(), bytes.size());
-  QUICHE_VLOG(2) << "ProcessBytes result: " << result;
+  QUICHE_VLOG(3) << "ProcessBytes result: " << result;
   if (fatal_visitor_callback_failure_) {
     QUICHE_DCHECK(latched_error_);
-    QUICHE_VLOG(2) << "Visitor callback failed while processing bytes.";
+    QUICHE_VLOG(3) << "Visitor callback failed while processing bytes.";
     return ProcessBytesError::kVisitorCallbackFailed;
   }
   if (latched_error_ || result < 0) {
-    QUICHE_VLOG(2) << "ProcessBytes encountered an error.";
+    QUICHE_VLOG(3) << "ProcessBytes encountered an error.";
     if (options_.blackhole_data_on_connection_error) {
       return static_cast<int64_t>(bytes.size() + preface_consumed);
     } else {
@@ -595,7 +595,7 @@
 
 int OgHttp2Session::Send() {
   if (sending_) {
-    QUICHE_VLOG(1) << TracePerspectiveAsString(options_.perspective)
+    QUICHE_VLOG(2) << TracePerspectiveAsString(options_.perspective)
                    << " returning early; already sending.";
     return 0;
   }
@@ -622,7 +622,7 @@
     const Http2StreamId stream_id = GetNextReadyStream();
     // TODO(birenroy): Add a return value to indicate write blockage, so streams
     // aren't woken unnecessarily.
-    QUICHE_VLOG(1) << "Waking stream " << stream_id << " for writes.";
+    QUICHE_VLOG(2) << "Waking stream " << stream_id << " for writes.";
     continue_writing = WriteForStream(stream_id);
   }
   if (continue_writing == SendResult::SEND_OK) {
@@ -878,7 +878,7 @@
          IsReadyToWriteData(state)) {
     DataFrameHeaderInfo info =
         GetDataFrameInfo(stream_id, available_window, state);
-    QUICHE_VLOG(2) << "WriteForStream | length: " << info.payload_length
+    QUICHE_VLOG(3) << "WriteForStream | length: " << info.payload_length
                    << " end_data: " << info.end_data
                    << " end_stream: " << info.end_stream
                    << " trailers: " << state.trailers.get();
@@ -1301,11 +1301,11 @@
       value = std::min(value, HpackCapacityBound(options_));
       if (value < framer_.GetHpackEncoder()->CurrentHeaderTableSizeSetting()) {
         // Safe to apply a smaller table capacity immediately.
-        QUICHE_VLOG(2) << TracePerspectiveAsString(options_.perspective)
+        QUICHE_VLOG(3) << TracePerspectiveAsString(options_.perspective)
                        << " applying encoder table capacity " << value;
         framer_.GetHpackEncoder()->ApplyHeaderTableSizeSetting(value);
       } else {
-        QUICHE_VLOG(2)
+        QUICHE_VLOG(3)
             << TracePerspectiveAsString(options_.perspective)
             << " NOT applying encoder table capacity until writing ack: "
             << value;
@@ -1524,6 +1524,8 @@
     connection_send_window_ += delta_window_size;
   } else {
     if (delta_window_size == 0) {
+      QUICHE_VLOG(1) << "Received WINDOW_UPDATE with delta 0 for stream "
+                     << stream_id;
       // A PROTOCOL_ERROR, according to RFC 9113 Section 6.9.
       EnqueueFrame(std::make_unique<spdy::SpdyRstStreamIR>(
           stream_id, spdy::ERROR_CODE_PROTOCOL_ERROR));
@@ -1555,7 +1557,7 @@
       it->second.send_window += delta_window_size;
       if (was_blocked && it->second.send_window > 0) {
         // The stream was blocked on flow control.
-        QUICHE_VLOG(1) << "Marking stream " << stream_id << " ready to write.";
+        QUICHE_VLOG(2) << "Marking stream " << stream_id << " ready to write.";
         write_scheduler_.MarkStreamReady(stream_id, false);
       }
     }
@@ -1643,13 +1645,13 @@
 void OgHttp2Session::OnHeaderStatus(Http2StreamId stream_id,
                                     OnHeaderResult result) {
   QUICHE_DCHECK(result != OnHeaderResult::HEADER_OK);
-  QUICHE_VLOG(1) << "OnHeaderStatus(stream_id=" << stream_id
-                 << ", result=" << static_cast<int>(result) << ")";
   const bool should_reset_stream =
       result == OnHeaderResult::HEADER_RST_STREAM ||
       result == OnHeaderResult::HEADER_FIELD_INVALID ||
       result == OnHeaderResult::HEADER_HTTP_MESSAGING;
   if (should_reset_stream) {
+    QUICHE_VLOG(1) << "OnHeaderStatus(stream_id=" << stream_id
+                   << ", result=" << static_cast<int>(result) << ")";
     const Http2ErrorCode error_code =
         (result == OnHeaderResult::HEADER_RST_STREAM)
             ? Http2ErrorCode::INTERNAL_ERROR
@@ -1675,10 +1677,14 @@
       }
     }
   } else if (result == OnHeaderResult::HEADER_CONNECTION_ERROR) {
+    QUICHE_VLOG(1) << "OnHeaderStatus(stream_id=" << stream_id
+                   << ", result=" << static_cast<int>(result) << ")";
     fatal_visitor_callback_failure_ = true;
     LatchErrorAndNotify(Http2ErrorCode::INTERNAL_ERROR,
                         ConnectionError::kHeaderError);
   } else if (result == OnHeaderResult::HEADER_COMPRESSION_ERROR) {
+    QUICHE_VLOG(1) << "OnHeaderStatus(stream_id=" << stream_id
+                   << ", result=" << static_cast<int>(result) << ")";
     LatchErrorAndNotify(Http2ErrorCode::COMPRESSION_ERROR,
                         ConnectionError::kHeaderError);
   }
@@ -1746,7 +1752,7 @@
       case INITIAL_WINDOW_SIZE:
       case MAX_FRAME_SIZE:
       case MAX_HEADER_LIST_SIZE:
-        QUICHE_VLOG(2)
+        QUICHE_VLOG(3)
             << "Not adjusting internal state for outbound setting with id "
             << id;
         break;
@@ -1775,7 +1781,7 @@
             case ENABLE_PUSH:
             case MAX_HEADER_LIST_SIZE:
             case ENABLE_CONNECT_PROTOCOL:
-              QUICHE_VLOG(2)
+              QUICHE_VLOG(3)
                   << "No action required in ack for outbound setting with id "
                   << id;
               break;
@@ -2034,6 +2040,7 @@
 }
 
 void OgHttp2Session::HandleContentLengthError(Http2StreamId stream_id) {
+  QUICHE_VLOG(1) << "Content length error for stream " << stream_id;
   if (current_frame_type_ == static_cast<uint8_t>(FrameType::HEADERS)) {
     // For consistency, either OnInvalidFrame should always be invoked,
     // regardless of frame type, or perhaps we should introduce an OnStreamError
