Skip to content

Commit

Permalink
util: switch tokio-util from log to tracing (#4539)
Browse files Browse the repository at this point in the history
  • Loading branch information
guswynn committed Feb 26, 2022
1 parent ac69d37 commit 413c812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tokio-util/Cargo.toml
Expand Up @@ -25,7 +25,7 @@ full = ["codec", "compat", "io-util", "time", "net", "rt"]

net = ["tokio/net"]
compat = ["futures-io",]
codec = []
codec = ["tracing"]
time = ["tokio/time","slab"]
io = []
io-util = ["io", "tokio/rt", "tokio/io-util"]
Expand All @@ -41,9 +41,9 @@ futures-core = "0.3.0"
futures-sink = "0.3.0"
futures-io = { version = "0.3.0", optional = true }
futures-util = { version = "0.3.0", optional = true }
log = "0.4"
pin-project-lite = "0.2.0"
slab = { version = "0.4.4", optional = true } # Backs `DelayQueue`
tracing = { version = "0.1.25", optional = true }

[dev-dependencies]
tokio = { version = "1.0.0", path = "../tokio", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions tokio-util/src/codec/framed_impl.rs
Expand Up @@ -7,12 +7,12 @@ use tokio::io::{AsyncRead, AsyncWrite};
use bytes::BytesMut;
use futures_core::ready;
use futures_sink::Sink;
use log::trace;
use pin_project_lite::pin_project;
use std::borrow::{Borrow, BorrowMut};
use std::io;
use std::pin::Pin;
use std::task::{Context, Poll};
use tracing::trace;

pin_project! {
#[derive(Debug)]
Expand Down Expand Up @@ -278,7 +278,7 @@ where

while !pinned.state.borrow_mut().buffer.is_empty() {
let WriteFrame { buffer } = pinned.state.borrow_mut();
trace!("writing; remaining={}", buffer.len());
trace!(remaining = buffer.len(), "writing;");

let n = ready!(poll_write_buf(pinned.inner.as_mut(), cx, buffer))?;

Expand Down

0 comments on commit 413c812

Please sign in to comment.