aboutsummaryrefslogtreecommitdiff
path: root/server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main.rs')
-rw-r--r--server/src/main.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index 27f81fbb..6ef34e45 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -20,7 +20,7 @@ use clap::Parser;
use futures_util::{SinkExt, StreamExt};
use hurrycurry_protocol::{PacketC, PacketS, PlayerID};
use hurrycurry_server::{data::DATA_DIR, state::State};
-use log::{debug, info, warn, LevelFilter};
+use log::{debug, info, trace, warn, LevelFilter};
use std::{path::PathBuf, process::exit, str::FromStr, sync::Arc, time::Duration};
use tokio::{
net::TcpListener,
@@ -156,7 +156,14 @@ async fn run() -> anyhow::Result<()> {
break;
}
};
- debug!("<- {id:?} {packet:?}");
+ if matches!(
+ packet,
+ PacketS::Position { .. } | PacketS::ReplayTick { .. }
+ ) {
+ trace!("<- {id:?} {packet:?}");
+ } else {
+ debug!("<- {id:?} {packet:?}");
+ }
let packet_out = match state.write().await.packet_in(id, packet).await {
Ok(packets) => packets,
Err(e) => {