diff options
| author | mat <git@matdoes.dev> | 2024-02-22 22:41:54 -0600 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2024-02-22 22:41:54 -0600 |
| commit | 038807e607c55757b3d9a9d51f0b9e65a781772b (patch) | |
| tree | f162c7397e7ff17f2c7cb1f3fde7178dea60b645 /azalea-protocol/src/read.rs | |
| parent | 69f7eebcb300bbefdc8b10c191a09db250bde630 (diff) | |
| download | azalea-drasl-038807e607c55757b3d9a9d51f0b9e65a781772b.tar.xz | |
fix for hypixel limbo
Diffstat (limited to 'azalea-protocol/src/read.rs')
| -rwxr-xr-x | azalea-protocol/src/read.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/azalea-protocol/src/read.rs b/azalea-protocol/src/read.rs index 7c641c76..e9337898 100755 --- a/azalea-protocol/src/read.rs +++ b/azalea-protocol/src/read.rs @@ -17,6 +17,7 @@ use std::{ use thiserror::Error; use tokio::io::AsyncRead; use tokio_util::codec::{BytesCodec, FramedRead}; +use tracing::trace; #[derive(Error, Debug)] pub enum ReadPacketError { @@ -348,15 +349,17 @@ where } if log::log_enabled!(log::Level::Trace) { + const EXTRA_LARGE_LOGS: bool = false; + let buf_string: String = { - if buf.len() > 500 { + if !EXTRA_LARGE_LOGS && buf.len() > 500 { let cut_off_buf = &buf[..500]; format!("{cut_off_buf:?}...") } else { format!("{buf:?}") } }; - tracing::trace!("Reading packet with bytes: {buf_string}"); + trace!("Reading packet with bytes: {buf_string}"); }; Ok(Some(buf)) |
