diff --git a/src/client.rs b/src/client.rs index ffeda6077..f932ec2bc 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1287,12 +1287,12 @@ async fn bind_connection(io: &mut T) -> Result<(), crate::Error> where T: AsyncRead + AsyncWrite + Unpin, { - tracing::debug!("binding client connection"); + tracing::trace!("binding client connection"); let msg: &'static [u8] = b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n"; io.write_all(msg).await.map_err(crate::Error::from_io)?; - tracing::debug!("client connection bound"); + tracing::trace!("client connection bound"); Ok(()) } diff --git a/src/codec/framed_read.rs b/src/codec/framed_read.rs index edb8d9548..8decec589 100644 --- a/src/codec/framed_read.rs +++ b/src/codec/framed_read.rs @@ -300,7 +300,7 @@ fn decode_frame( } else { let cnt = partial.continuation_frames_count + 1; if cnt > max_continuation_frames { - tracing::debug!("too_many_continuations, max = {}", max_continuation_frames); + tracing::trace!("too_many_continuations, max = {}", max_continuation_frames); return Err(Error::library_go_away_data( Reason::ENHANCE_YOUR_CALM, "too_many_continuations", @@ -401,7 +401,7 @@ where partial, bytes, )? { - tracing::debug!(?frame, "received"); + tracing::trace!(?frame, "received"); return Poll::Ready(Some(Ok(frame))); } } diff --git a/src/codec/framed_write.rs b/src/codec/framed_write.rs index c88af02da..7855c5aeb 100644 --- a/src/codec/framed_write.rs +++ b/src/codec/framed_write.rs @@ -210,7 +210,7 @@ where let span = tracing::trace_span!("FramedWrite::buffer", frame = ?item); let _e = span.enter(); - tracing::debug!(frame = ?item, "send"); + tracing::trace!(frame = ?item, "send"); match item { Frame::Data(mut v) => { diff --git a/src/frame/settings.rs b/src/frame/settings.rs index 484498a9d..5edd58ae6 100644 --- a/src/frame/settings.rs +++ b/src/frame/settings.rs @@ -149,7 +149,7 @@ impl Settings { // Ensure the payload length is correct, each setting is 6 bytes long. if payload.len() % 6 != 0 { - tracing::debug!("invalid settings payload length; len={:?}", payload.len()); + tracing::trace!("invalid settings payload length; len={:?}", payload.len()); return Err(Error::InvalidPayloadAckSettings); } diff --git a/src/hpack/decoder.rs b/src/hpack/decoder.rs index e48976c36..f5bc52c18 100644 --- a/src/hpack/decoder.rs +++ b/src/hpack/decoder.rs @@ -257,7 +257,7 @@ impl Decoder { return Err(DecoderError::InvalidMaxDynamicSize); } - tracing::debug!( + tracing::trace!( from = self.table.size(), to = new_size, "Decoder changed max table size" diff --git a/src/lib.rs b/src/lib.rs index 3d59ef21e..7716e84ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,10 +89,10 @@ macro_rules! proto_err { (conn: $($msg:tt)+) => { - tracing::debug!("connection error PROTOCOL_ERROR -- {};", format_args!($($msg)+)) + tracing::trace!("connection error PROTOCOL_ERROR -- {};", format_args!($($msg)+)) }; (stream: $($msg:tt)+) => { - tracing::debug!("stream error PROTOCOL_ERROR -- {};", format_args!($($msg)+)) + tracing::trace!("stream error PROTOCOL_ERROR -- {};", format_args!($($msg)+)) }; } diff --git a/src/proto/connection.rs b/src/proto/connection.rs index 5589fabcb..7510eae13 100644 --- a/src/proto/connection.rs +++ b/src/proto/connection.rs @@ -135,7 +135,7 @@ where ping_pong: PingPong::new(), settings: Settings::new(config.settings), streams, - span: tracing::debug_span!("Connection", peer = %P::NAME), + span: tracing::trace_span!("Connection", peer = %P::NAME), _phantom: PhantomData, }, } @@ -432,7 +432,7 @@ where // terminating the connection. Err(Error::GoAway(debug_data, reason, initiator)) => { let e = Error::GoAway(debug_data.clone(), reason, initiator); - tracing::debug!(error = ?e, "Connection::poll; connection error"); + tracing::trace!(error = ?e, "Connection::poll; connection error"); // We may have already sent a GOAWAY for this error, // if so, don't send another, just flush and close up. @@ -465,7 +465,7 @@ where // // TODO: Are I/O errors recoverable? Err(Error::Io(kind, inner)) => { - tracing::debug!(error = ?kind, "Connection::poll; IO error"); + tracing::trace!(error = ?kind, "Connection::poll; IO error"); let e = Error::Io(kind, inner); // Reset all active streams diff --git a/src/proto/settings.rs b/src/proto/settings.rs index d6155fc3d..66a3a9ac0 100644 --- a/src/proto/settings.rs +++ b/src/proto/settings.rs @@ -53,7 +53,7 @@ impl Settings { if frame.is_ack() { match &self.local { Local::WaitingAck(local) => { - tracing::debug!("received settings ACK; applying {:?}", local); + tracing::trace!("received settings ACK; applying {:?}", local); if let Some(max) = local.max_frame_size() { codec.set_max_recv_frame_size(max as usize); diff --git a/src/proto/streams/recv.rs b/src/proto/streams/recv.rs index d8572d00a..e6a6a38d3 100644 --- a/src/proto/streams/recv.rs +++ b/src/proto/streams/recv.rs @@ -212,7 +212,7 @@ impl Recv { // So, if peer is a server, we'll send a 431. In either case, // an error is recorded, which will send a REFUSED_STREAM, // since we don't want any of the data frames either. - tracing::debug!( + tracing::trace!( "stream error REQUEST_HEADER_FIELDS_TOO_LARGE -- \ recv_headers: frame is over size; stream={:?}", stream.id @@ -699,7 +699,7 @@ impl Recv { pub fn consume_connection_window(&mut self, sz: WindowSize) -> Result<(), Error> { if self.flow.window_size() < sz { - tracing::debug!( + tracing::trace!( "connection error FLOW_CONTROL_ERROR -- window_size ({:?}) < sz ({:?});", self.flow.window_size(), sz, @@ -733,7 +733,7 @@ impl Recv { // So, if peer is a server, we'll send a 431. In either case, // an error is recorded, which will send a PROTOCOL_ERROR, // since we don't want any of the data frames either. - tracing::debug!( + tracing::trace!( "stream error PROTOCOL_ERROR -- recv_push_promise: \ headers frame is over size; promised_id={:?};", frame.promised_id(), @@ -780,7 +780,7 @@ impl Recv { pub fn ensure_not_idle(&self, id: StreamId) -> Result<(), Reason> { if let Ok(next) = self.next_stream_id { if id >= next { - tracing::debug!( + tracing::trace!( "stream ID implicitly closed, PROTOCOL_ERROR; stream={:?}", id ); diff --git a/src/proto/streams/send.rs b/src/proto/streams/send.rs index 2a7abba06..a2cdbd6d6 100644 --- a/src/proto/streams/send.rs +++ b/src/proto/streams/send.rs @@ -85,11 +85,11 @@ impl Send { || fields.contains_key("keep-alive") || fields.contains_key("proxy-connection") { - tracing::debug!("illegal connection-specific headers found"); + tracing::trace!("illegal connection-specific headers found"); return Err(UserError::MalformedHeaders); } else if let Some(te) = fields.get(http::header::TE) { if te != "trailers" { - tracing::debug!("illegal connection-specific headers found"); + tracing::trace!("illegal connection-specific headers found"); return Err(UserError::MalformedHeaders); } } @@ -375,7 +375,7 @@ impl Send { task: &mut Option, ) -> Result<(), Reason> { if let Err(e) = self.prioritize.recv_stream_window_update(sz, stream) { - tracing::debug!("recv_stream_window_update !!; err={:?}", e); + tracing::trace!("recv_stream_window_update !!; err={:?}", e); self.send_reset( Reason::FLOW_CONTROL_ERROR, diff --git a/src/proto/streams/streams.rs b/src/proto/streams/streams.rs index 7b5c7669a..cb53f765f 100644 --- a/src/proto/streams/streams.rs +++ b/src/proto/streams/streams.rs @@ -445,7 +445,7 @@ impl Inner { // This may be response headers for a stream we've already // forgotten about... if self.actions.may_have_forgotten_stream(peer, id) { - tracing::debug!( + tracing::trace!( "recv_headers for old stream={:?}, sending STREAM_CLOSED", id, ); @@ -555,7 +555,7 @@ impl Inner { } if self.actions.may_have_forgotten_stream(peer, id) { - tracing::debug!("recv_data for old stream={:?}, sending STREAM_CLOSED", id,); + tracing::trace!("recv_data for old stream={:?}, sending STREAM_CLOSED", id,); let sz = frame.payload().len(); // This should have been enforced at the codec::FramedRead layer, so diff --git a/src/server.rs b/src/server.rs index b00bc0866..55560d522 100644 --- a/src/server.rs +++ b/src/server.rs @@ -1454,12 +1454,12 @@ impl Peer { if let Err(e) = frame::PushPromise::validate_request(&request) { use PushPromiseHeaderError::*; match e { - NotSafeAndCacheable => tracing::debug!( + NotSafeAndCacheable => tracing::trace!( ?promised_id, "convert_push_message: method {} is not safe and cacheable", request.method(), ), - InvalidContentLength(e) => tracing::debug!( + InvalidContentLength(e) => tracing::trace!( ?promised_id, "convert_push_message; promised request has invalid content-length {:?}", e, @@ -1516,7 +1516,7 @@ impl proto::Peer for Peer { macro_rules! malformed { ($($arg:tt)*) => {{ - tracing::debug!($($arg)*); + tracing::trace!($($arg)*); return Err(Error::library_reset(stream_id, Reason::PROTOCOL_ERROR)); }} }