From 9633508a3a31a70c657329fdeca0050b7082959e Mon Sep 17 00:00:00 2001 From: mat Date: Sat, 18 Nov 2023 00:58:47 -0600 Subject: replace log with tracing --- azalea-protocol/src/read.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'azalea-protocol/src/read.rs') 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)) } -- cgit v1.2.3