diff options
| author | Ubuntu <github@matdoes.dev> | 2022-09-19 19:53:16 +0000 |
|---|---|---|
| committer | Ubuntu <github@matdoes.dev> | 2022-09-19 19:53:16 +0000 |
| commit | 14a6f9d9f89452b56102ffc5dc61125cc2b63aff (patch) | |
| tree | e73c03bb327422142dc27c3b163f49d44f948d0e /azalea-protocol | |
| parent | 4247945df13507fb07a4746263bb702d6fbe04cd (diff) | |
| download | azalea-drasl-14a6f9d9f89452b56102ffc5dc61125cc2b63aff.tar.xz | |
replace printlns with log
Diffstat (limited to 'azalea-protocol')
| -rwxr-xr-x | azalea-protocol/src/lib.rs | 4 | ||||
| -rw-r--r-- | azalea-protocol/src/packets/game/clientbound_commands_packet.rs | 3 | ||||
| -rwxr-xr-x | azalea-protocol/src/resolver.rs | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/azalea-protocol/src/lib.rs b/azalea-protocol/src/lib.rs index 1f864d45..9fff59f8 100755 --- a/azalea-protocol/src/lib.rs +++ b/azalea-protocol/src/lib.rs @@ -43,8 +43,10 @@ impl<'a> TryFrom<&'a str> for ServerAddress { #[cfg(feature = "connecting")] pub async fn connect(address: ServerAddress) -> Result<(), Box<dyn std::error::Error>> { + use log::debug; + let resolved_address = resolver::resolve_address(&address).await; - println!("Resolved address: {:?}", resolved_address); + debug!("Resolved address: {:?}", resolved_address); Ok(()) } diff --git a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs b/azalea-protocol/src/packets/game/clientbound_commands_packet.rs index c05f710a..e18cf52b 100644 --- a/azalea-protocol/src/packets/game/clientbound_commands_packet.rs +++ b/azalea-protocol/src/packets/game/clientbound_commands_packet.rs @@ -4,6 +4,7 @@ use azalea_buf::McBufVarReadable; use azalea_buf::{McBufReadable, McBufWritable}; use azalea_core::ResourceLocation; use azalea_protocol_macros::ClientboundGamePacket; +use log::warn; use std::io::{Read, Write}; #[derive(Clone, Debug, McBuf, ClientboundGamePacket)] @@ -205,7 +206,7 @@ impl McBufReadable for BrigadierNodeStub { fn read_from(buf: &mut impl Read) -> Result<Self, BufReadError> { let flags = u8::read_from(buf)?; if flags > 31 { - eprintln!( + warn!( "Warning: The flags from a Brigadier node are over 31 ({flags}; {flags:#b}). This is probably a bug.", ); } diff --git a/azalea-protocol/src/resolver.rs b/azalea-protocol/src/resolver.rs index e21362a5..eb081c3f 100755 --- a/azalea-protocol/src/resolver.rs +++ b/azalea-protocol/src/resolver.rs @@ -47,7 +47,7 @@ pub async fn resolve_address(address: &ServerAddress) -> Result<ServerIpAddress, port: redirect_srv.port(), }; - // println!("redirecting to {:?}", redirect_address); + // debug!("redirecting to {:?}", redirect_address); return resolve_address(&redirect_address).await; } |
