Skip to content

Commit 2357ad2

Browse files
author
Louis Thiery
committed
tone down all debug to trace
1 parent cffea95 commit 2357ad2

File tree

12 files changed

+25
-25
lines changed

12 files changed

+25
-25
lines changed

src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,12 +1287,12 @@ async fn bind_connection<T>(io: &mut T) -> Result<(), crate::Error>
12871287
where
12881288
T: AsyncRead + AsyncWrite + Unpin,
12891289
{
1290-
tracing::debug!("binding client connection");
1290+
tracing::trace!("binding client connection");
12911291

12921292
let msg: &'static [u8] = b"PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n";
12931293
io.write_all(msg).await.map_err(crate::Error::from_io)?;
12941294

1295-
tracing::debug!("client connection bound");
1295+
tracing::trace!("client connection bound");
12961296

12971297
Ok(())
12981298
}

src/codec/framed_read.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ fn decode_frame(
300300
} else {
301301
let cnt = partial.continuation_frames_count + 1;
302302
if cnt > max_continuation_frames {
303-
tracing::debug!("too_many_continuations, max = {}", max_continuation_frames);
303+
tracing::trace!("too_many_continuations, max = {}", max_continuation_frames);
304304
return Err(Error::library_go_away_data(
305305
Reason::ENHANCE_YOUR_CALM,
306306
"too_many_continuations",
@@ -401,7 +401,7 @@ where
401401
partial,
402402
bytes,
403403
)? {
404-
tracing::debug!(?frame, "received");
404+
tracing::trace!(?frame, "received");
405405
return Poll::Ready(Some(Ok(frame)));
406406
}
407407
}

src/codec/framed_write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ where
210210
let span = tracing::trace_span!("FramedWrite::buffer", frame = ?item);
211211
let _e = span.enter();
212212

213-
tracing::debug!(frame = ?item, "send");
213+
tracing::trace!(frame = ?item, "send");
214214

215215
match item {
216216
Frame::Data(mut v) => {

src/frame/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl Settings {
149149

150150
// Ensure the payload length is correct, each setting is 6 bytes long.
151151
if payload.len() % 6 != 0 {
152-
tracing::debug!("invalid settings payload length; len={:?}", payload.len());
152+
tracing::trace!("invalid settings payload length; len={:?}", payload.len());
153153
return Err(Error::InvalidPayloadAckSettings);
154154
}
155155

src/hpack/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ impl Decoder {
257257
return Err(DecoderError::InvalidMaxDynamicSize);
258258
}
259259

260-
tracing::debug!(
260+
tracing::trace!(
261261
from = self.table.size(),
262262
to = new_size,
263263
"Decoder changed max table size"

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@
8989

9090
macro_rules! proto_err {
9191
(conn: $($msg:tt)+) => {
92-
tracing::debug!("connection error PROTOCOL_ERROR -- {};", format_args!($($msg)+))
92+
tracing::trace!("connection error PROTOCOL_ERROR -- {};", format_args!($($msg)+))
9393
};
9494
(stream: $($msg:tt)+) => {
95-
tracing::debug!("stream error PROTOCOL_ERROR -- {};", format_args!($($msg)+))
95+
tracing::trace!("stream error PROTOCOL_ERROR -- {};", format_args!($($msg)+))
9696
};
9797
}
9898

src/proto/connection.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ where
135135
ping_pong: PingPong::new(),
136136
settings: Settings::new(config.settings),
137137
streams,
138-
span: tracing::debug_span!("Connection", peer = %P::NAME),
138+
span: tracing::trace_span!("Connection", peer = %P::NAME),
139139
_phantom: PhantomData,
140140
},
141141
}
@@ -432,7 +432,7 @@ where
432432
// terminating the connection.
433433
Err(Error::GoAway(debug_data, reason, initiator)) => {
434434
let e = Error::GoAway(debug_data.clone(), reason, initiator);
435-
tracing::debug!(error = ?e, "Connection::poll; connection error");
435+
tracing::trace!(error = ?e, "Connection::poll; connection error");
436436

437437
// We may have already sent a GOAWAY for this error,
438438
// if so, don't send another, just flush and close up.
@@ -465,7 +465,7 @@ where
465465
//
466466
// TODO: Are I/O errors recoverable?
467467
Err(Error::Io(kind, inner)) => {
468-
tracing::debug!(error = ?kind, "Connection::poll; IO error");
468+
tracing::trace!(error = ?kind, "Connection::poll; IO error");
469469
let e = Error::Io(kind, inner);
470470

471471
// Reset all active streams

src/proto/settings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl Settings {
5353
if frame.is_ack() {
5454
match &self.local {
5555
Local::WaitingAck(local) => {
56-
tracing::debug!("received settings ACK; applying {:?}", local);
56+
tracing::trace!("received settings ACK; applying {:?}", local);
5757

5858
if let Some(max) = local.max_frame_size() {
5959
codec.set_max_recv_frame_size(max as usize);

src/proto/streams/recv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ impl Recv {
212212
// So, if peer is a server, we'll send a 431. In either case,
213213
// an error is recorded, which will send a REFUSED_STREAM,
214214
// since we don't want any of the data frames either.
215-
tracing::debug!(
215+
tracing::trace!(
216216
"stream error REQUEST_HEADER_FIELDS_TOO_LARGE -- \
217217
recv_headers: frame is over size; stream={:?}",
218218
stream.id
@@ -699,7 +699,7 @@ impl Recv {
699699

700700
pub fn consume_connection_window(&mut self, sz: WindowSize) -> Result<(), Error> {
701701
if self.flow.window_size() < sz {
702-
tracing::debug!(
702+
tracing::trace!(
703703
"connection error FLOW_CONTROL_ERROR -- window_size ({:?}) < sz ({:?});",
704704
self.flow.window_size(),
705705
sz,
@@ -733,7 +733,7 @@ impl Recv {
733733
// So, if peer is a server, we'll send a 431. In either case,
734734
// an error is recorded, which will send a PROTOCOL_ERROR,
735735
// since we don't want any of the data frames either.
736-
tracing::debug!(
736+
tracing::trace!(
737737
"stream error PROTOCOL_ERROR -- recv_push_promise: \
738738
headers frame is over size; promised_id={:?};",
739739
frame.promised_id(),
@@ -780,7 +780,7 @@ impl Recv {
780780
pub fn ensure_not_idle(&self, id: StreamId) -> Result<(), Reason> {
781781
if let Ok(next) = self.next_stream_id {
782782
if id >= next {
783-
tracing::debug!(
783+
tracing::trace!(
784784
"stream ID implicitly closed, PROTOCOL_ERROR; stream={:?}",
785785
id
786786
);

src/proto/streams/send.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ impl Send {
8585
|| fields.contains_key("keep-alive")
8686
|| fields.contains_key("proxy-connection")
8787
{
88-
tracing::debug!("illegal connection-specific headers found");
88+
tracing::trace!("illegal connection-specific headers found");
8989
return Err(UserError::MalformedHeaders);
9090
} else if let Some(te) = fields.get(http::header::TE) {
9191
if te != "trailers" {
92-
tracing::debug!("illegal connection-specific headers found");
92+
tracing::trace!("illegal connection-specific headers found");
9393
return Err(UserError::MalformedHeaders);
9494
}
9595
}
@@ -375,7 +375,7 @@ impl Send {
375375
task: &mut Option<Waker>,
376376
) -> Result<(), Reason> {
377377
if let Err(e) = self.prioritize.recv_stream_window_update(sz, stream) {
378-
tracing::debug!("recv_stream_window_update !!; err={:?}", e);
378+
tracing::trace!("recv_stream_window_update !!; err={:?}", e);
379379

380380
self.send_reset(
381381
Reason::FLOW_CONTROL_ERROR,

src/proto/streams/streams.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ impl Inner {
445445
// This may be response headers for a stream we've already
446446
// forgotten about...
447447
if self.actions.may_have_forgotten_stream(peer, id) {
448-
tracing::debug!(
448+
tracing::trace!(
449449
"recv_headers for old stream={:?}, sending STREAM_CLOSED",
450450
id,
451451
);
@@ -555,7 +555,7 @@ impl Inner {
555555
}
556556

557557
if self.actions.may_have_forgotten_stream(peer, id) {
558-
tracing::debug!("recv_data for old stream={:?}, sending STREAM_CLOSED", id,);
558+
tracing::trace!("recv_data for old stream={:?}, sending STREAM_CLOSED", id,);
559559

560560
let sz = frame.payload().len();
561561
// This should have been enforced at the codec::FramedRead layer, so

src/server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,12 +1454,12 @@ impl Peer {
14541454
if let Err(e) = frame::PushPromise::validate_request(&request) {
14551455
use PushPromiseHeaderError::*;
14561456
match e {
1457-
NotSafeAndCacheable => tracing::debug!(
1457+
NotSafeAndCacheable => tracing::trace!(
14581458
?promised_id,
14591459
"convert_push_message: method {} is not safe and cacheable",
14601460
request.method(),
14611461
),
1462-
InvalidContentLength(e) => tracing::debug!(
1462+
InvalidContentLength(e) => tracing::trace!(
14631463
?promised_id,
14641464
"convert_push_message; promised request has invalid content-length {:?}",
14651465
e,
@@ -1516,7 +1516,7 @@ impl proto::Peer for Peer {
15161516

15171517
macro_rules! malformed {
15181518
($($arg:tt)*) => {{
1519-
tracing::debug!($($arg)*);
1519+
tracing::trace!($($arg)*);
15201520
return Err(Error::library_reset(stream_id, Reason::PROTOCOL_ERROR));
15211521
}}
15221522
}

0 commit comments

Comments
 (0)