From 46c7d1bf7dd359e5eef6bc9eff023be7b9addb93 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 28 Oct 2026 05:13:18 +0100 Subject: cleanup log messages --- src/swarm/sync.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/swarm/sync.rs') diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs index 011f049..df4bb2d 100644 --- a/src/swarm/sync.rs +++ b/src/swarm/sync.rs @@ -39,7 +39,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { return Ok(()); } let Some(peer_state_mutex) = state.get_peer_state(peer).await else { - trace!("Peer was forgotten; skipping synchronization"); + trace!("Peer was forgotten; skipping sync"); return Ok(()); }; @@ -50,7 +50,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { if matches!(peer_state.liveness, Liveness::Dormant { .. }) { // Reactivation re-handshakes, and PeerValidated then restarts sync. - trace!("Skipping synchronization with dormant peer"); + trace!("Skipping sync with dormant peer"); return Ok(()); } @@ -59,7 +59,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { .is_some_and(|epoch| epoch != state.local_epoch()) { // Unrelated document histories must never be synced. - trace!("Skipping synchronization with peer on another epoch"); + trace!("Skipping sync with peer on another epoch"); return Ok(()); } @@ -222,7 +222,7 @@ async fn deliver_sync_to_peer(state: &AppState, peer: &str) -> Result<()> { tokio::spawn(async move { if let Err(error) = send_generated(&state, &peer, &peer_state_mutex, session, encoded).await { - warn!(peer = %peer, error = %format!("{error:#}"), "Synchronization processing failed"); + warn!(peer = %peer, error = %format!("{error:#}"), "Sync processing failed"); } }); Ok(()) @@ -393,7 +393,7 @@ pub(crate) async fn handle_sync( peer_state .sync .receive(&mut replica.doc, message) - .context("Automerge synchronization failed")?; + .context("Automerge sync failed")?; peer_state.last_sync_rx = Some(Instant::now()); if let Some(wait) = &peer_state.sync.reply { throughput @@ -551,7 +551,7 @@ pub(crate) async fn run_sync_worker(state: AppState, mut rx: mpsc::UnboundedRece let mut dirty_peers = HashSet::::new(); let mut document_dirty = false; - info!("Starting synchronization worker"); + info!("Starting the sync worker"); loop { if dirty_peers.is_empty() && !document_dirty { @@ -567,7 +567,7 @@ pub(crate) async fn run_sync_worker(state: AppState, mut rx: mpsc::UnboundedRece } }, None => { - warn!("Synchronization event channel closed"); + warn!("Sync event channel closed"); return; } } @@ -617,7 +617,7 @@ pub(crate) async fn run_sync_worker(state: AppState, mut rx: mpsc::UnboundedRece warn!( peer = %peer, error = %format!("{error:#}"), - "Synchronization processing failed" + "Sync processing failed" ); } } -- cgit v1.3.1