diff options
| author | mat <git@matdoes.dev> | 2023-11-18 00:58:47 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2023-11-18 00:58:47 -0600 |
| commit | 9633508a3a31a70c657329fdeca0050b7082959e (patch) | |
| tree | 9973ed4e60a0bd2b77413a195b2a166854f04d43 /azalea-protocol/src/read.rs | |
| parent | b79ae025f08935044c621259d4e0c4bb72bbcd7f (diff) | |
| download | azalea-drasl-9633508a3a31a70c657329fdeca0050b7082959e.tar.xz | |
replace log with tracing
Diffstat (limited to 'azalea-protocol/src/read.rs')
| -rwxr-xr-x | azalea-protocol/src/read.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 4002f4cb..d1985b31 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -9,7 +9,6 @@ use bytes::BytesMut; use flate2::read::ZlibDecoder; use futures::StreamExt; use futures_lite::future; -use log::{log_enabled, trace}; use std::backtrace::Backtrace; use std::{ fmt::Debug, @@ -18,6 +17,7 @@ use std::{ use thiserror::Error; use tokio::io::AsyncRead; use tokio_util::codec::{BytesCodec, FramedRead}; +use tracing::if_log_enabled; #[derive(Error, Debug)] pub enum ReadPacketError { @@ -346,7 +346,7 @@ where .map_err(ReadPacketError::from)?; } - if log_enabled!(log::Level::Trace) { + if_log_enabled!(tracing::Level::TRACE, { let buf_string: String = { if buf.len() > 500 { let cut_off_buf = &buf[..500]; @@ -356,7 +356,7 @@ where } }; trace!("Reading packet with bytes: {buf_string}"); - } + }); Ok(Some(buf)) } |
