mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
codec: make tracing feature optional for codecs (#6434)
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This commit is contained in:
parent
1fcb77db34
commit
d298049299
@ -25,7 +25,7 @@ full = ["codec", "compat", "io-util", "time", "net", "rt"]
|
||||
|
||||
net = ["tokio/net"]
|
||||
compat = ["futures-io",]
|
||||
codec = ["tracing"]
|
||||
codec = []
|
||||
time = ["tokio/time","slab"]
|
||||
io = []
|
||||
io-util = ["io", "tokio/rt", "tokio/io-util"]
|
||||
|
@ -12,7 +12,6 @@ use std::borrow::{Borrow, BorrowMut};
|
||||
use std::io;
|
||||
use std::pin::Pin;
|
||||
use std::task::{Context, Poll};
|
||||
use tracing::trace;
|
||||
|
||||
pin_project! {
|
||||
#[derive(Debug)]
|
||||
|
@ -25,6 +25,9 @@ mod cfg;
|
||||
mod loom;
|
||||
|
||||
cfg_codec! {
|
||||
#[macro_use]
|
||||
mod tracing;
|
||||
|
||||
pub mod codec;
|
||||
}
|
||||
|
||||
|
6
tokio-util/src/tracing.rs
Normal file
6
tokio-util/src/tracing.rs
Normal file
@ -0,0 +1,6 @@
|
||||
macro_rules! trace {
|
||||
($($arg:tt)*) => {
|
||||
#[cfg(feature = "tracing")]
|
||||
tracing::trace!($($arg)*);
|
||||
};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user