Skip to content

Commit ded71ec

Browse files
authored
balancer: tweak logging for debugging (#1661)
1 parent d84bba1 commit ded71ec

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

crates/ott-balancer/src/balancer.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -618,13 +618,14 @@ pub async fn dispatch_monolith_message(
618618
);
619619
}
620620
MsgM2B::Loaded(msg) => {
621-
debug!("room loaded on {}: {:?}", monolith_id, msg.room.name);
621+
info!(monolith_id = %monolith_id, room = %msg.room.name, load_epoch = %msg.load_epoch, "room loaded");
622622
let mut ctx_write = ctx.write().await;
623623
ctx_write
624624
.add_or_sync_room(msg.room, *monolith_id, msg.load_epoch)
625625
.await?;
626626
}
627627
MsgM2B::Unloaded(msg) => {
628+
info!(monolith_id = %monolith_id, room = %msg.name, "room unloaded");
628629
let mut ctx_write = ctx.write().await;
629630
ctx_write.remove_room(&msg.name, *monolith_id).await?;
630631
}

crates/ott-balancer/src/connection.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ async fn connect_and_maintain(
251251
}
252252

253253
_ = cancel.cancelled() => {
254-
info!("Monolith connection cancelled, safely ending: {}", monolith_id);
254+
info!(monolith_id = %monolith_id, "Monolith connection cancelled, safely ending");
255255
#[allow(deprecated)]
256256
if let Err(err) = link
257257
.send_monolith_message(monolith_id, SocketMessage::End)

0 commit comments

Comments
 (0)