diff --git a/livekit-ffi/src/server/room.rs b/livekit-ffi/src/server/room.rs index e083000c..2e15a8d7 100644 --- a/livekit-ffi/src/server/room.rs +++ b/livekit-ffi/src/server/room.rs @@ -329,7 +329,7 @@ impl RoomInner { break; // Event was sent } - log::info!("waiting for the LocalTrackUnpublished event to be sent"); + log::debug!("waiting for the LocalTrackUnpublished event to be sent"); tokio::time::sleep(tokio::time::Duration::from_millis(50)).await; } } @@ -512,7 +512,7 @@ async fn forward_event( if inner.pending_published_tracks.lock().remove(&sid) { break; } - log::info!("waiting for the PublishTrack callback to be sent"); + log::debug!("waiting for the PublishTrack callback to be sent"); tokio::time::sleep(tokio::time::Duration::from_millis(50)).await; } } diff --git a/livekit/src/room/mod.rs b/livekit/src/room/mod.rs index 9725aaa0..69e3f528 100644 --- a/livekit/src/room/mod.rs +++ b/livekit/src/room/mod.rs @@ -287,7 +287,7 @@ impl Room { let dispatcher = dispatcher.clone(); let e2ee_manager = e2ee_manager.clone(); move |participant, publication| { - log::info!("local track published: {}", publication.sid()); + log::debug!("local track published: {}", publication.sid()); let track = publication.track().unwrap(); let event = RoomEvent::LocalTrackPublished { participant: participant.clone(), @@ -303,7 +303,7 @@ impl Room { let dispatcher = dispatcher.clone(); let e2ee_manager = e2ee_manager.clone(); move |participant, publication| { - log::info!("local track unpublished: {}", publication.sid()); + log::debug!("local track unpublished: {}", publication.sid()); let event = RoomEvent::LocalTrackUnpublished { participant: participant.clone(), publication: publication.clone(), @@ -369,7 +369,6 @@ impl Room { move |participant_identity, state| { // Forward e2ee events to the room // (Ignore if the participant is not in the room anymore) - log::info!("e2ee state changed for {}: {:?}", participant_identity, state); let participant = if participant_identity.as_str() == inner.local_participant.identity().as_str() @@ -605,7 +604,6 @@ impl RoomSession { /// It'll create, update or remove a participant /// It also update the participant tracks. fn handle_participant_update(self: &Arc, updates: Vec) { - log::info!("participant update: {:?}", updates); for pi in updates { let participant_sid = pi.sid.clone().try_into().unwrap(); let participant_identity: ParticipantIdentity = pi.identity.clone().into(); @@ -639,7 +637,6 @@ impl RoomSession { remote_participant.update_info(pi.clone()); } else { // Create a new participant - log::info!("new participant: {}", pi.sid); let remote_participant = { let pi = pi.clone(); self.create_participant( @@ -820,7 +817,7 @@ impl RoomSession { data_channels: dcs, }; - log::info!("sending sync state {:?}", sync_state); + log::debug!("sending sync state {:?}", sync_state); self.rtc_engine.send_request(proto::signal_request::Message::SyncState(sync_state)).await; } @@ -943,7 +940,7 @@ impl RoomSession { } fn handle_disconnected(&self, reason: DisconnectReason) { - log::info!("disconnected from room: {:?}", reason); + log::debug!("disconnected from room: {:?}", reason); if self.update_connection_state(ConnectionState::Disconnected) { self.dispatcher.dispatch(&RoomEvent::Disconnected { reason }); } @@ -1037,7 +1034,6 @@ impl RoomSession { let dispatcher = self.dispatcher.clone(); let e2ee_manager = self.e2ee_manager.clone(); move |participant, publication, track| { - log::info!("track subscribed: {}", track.sid()); let event = RoomEvent::TrackSubscribed { participant: participant.clone(), track: track.clone(), @@ -1052,7 +1048,6 @@ impl RoomSession { let dispatcher = self.dispatcher.clone(); let e2ee_manager = self.e2ee_manager.clone(); move |participant, publication, track| { - log::info!("track unsubscribed: {}", track.sid()); let event = RoomEvent::TrackUnsubscribed { participant: participant.clone(), track: track.clone(), @@ -1116,7 +1111,6 @@ impl RoomSession { /// A participant has disconnected /// Cleanup the participant and emit an event fn handle_participant_disconnect(self: Arc, remote_participant: RemoteParticipant) { - log::info!("handle_participant_disconnect: {}", remote_participant.sid()); for (sid, _) in remote_participant.tracks() { remote_participant.unpublish_track(&sid); } diff --git a/livekit/src/rtc_engine/mod.rs b/livekit/src/rtc_engine/mod.rs index 190d8cc7..da7bda03 100644 --- a/livekit/src/rtc_engine/mod.rs +++ b/livekit/src/rtc_engine/mod.rs @@ -380,7 +380,7 @@ impl EngineInner { async fn on_session_event(self: &Arc, event: SessionEvent) -> EngineResult<()> { match event { SessionEvent::Close { source, reason, can_reconnect, retry_now, full_reconnect } => { - log::info!("received session close: {}, {:?}", source, reason); + log::debug!("received session close: {}, {:?}", source, reason); if can_reconnect { self.reconnection_needed(retry_now, full_reconnect); } else { @@ -499,7 +499,7 @@ impl EngineInner { tokio::select! { _ = &mut close_receiver => { - log::info!("reconnection cancelled"); + log::debug!("reconnection cancelled"); return; } res = inner.reconnect_task() => { diff --git a/livekit/src/rtc_engine/rtc_events.rs b/livekit/src/rtc_engine/rtc_events.rs index 88bd1707..576b867d 100644 --- a/livekit/src/rtc_engine/rtc_events.rs +++ b/livekit/src/rtc_engine/rtc_events.rs @@ -14,7 +14,6 @@ use libwebrtc::{self as rtc, prelude::*}; use livekit_protocol as proto; -use log::error; use tokio::sync::mpsc; use super::peer_transport::PeerTransport; @@ -108,7 +107,7 @@ fn on_ice_candidate_error( _emitter: RtcEmitter, ) -> rtc::peer_connection::OnIceCandidateError { Box::new(move |ice_error| { - error!("{:?}", ice_error); + log::debug!("{:?}", ice_error); }) } diff --git a/livekit/src/rtc_engine/rtc_session.rs b/livekit/src/rtc_engine/rtc_session.rs index b395d56f..5d7f0ab0 100644 --- a/livekit/src/rtc_engine/rtc_session.rs +++ b/livekit/src/rtc_engine/rtc_session.rs @@ -177,7 +177,7 @@ impl RtcSession { let (signal_client, join_response, signal_events) = SignalClient::connect(url, token, options.signal_options.clone()).await?; let signal_client = Arc::new(signal_client); - log::info!("received JoinResponse: {:?}", join_response); + log::debug!("received JoinResponse: {:?}", join_response); let (rtc_emitter, rtc_events) = mpsc::unbounded_channel(); let rtc_config = make_rtc_config_join(join_response.clone(), options.rtc_config.clone()); @@ -825,7 +825,7 @@ impl SessionInner { /// ['RTCEngine'] async fn restart(&self) -> EngineResult { let reconnect_response = self.signal_client.restart().await?; - log::info!("received reconnect response: {:?}", reconnect_response); + log::debug!("received reconnect response: {:?}", reconnect_response); let rtc_config = make_rtc_config_reconnect(reconnect_response.clone(), self.options.rtc_config.clone());