From f7fcdba5f4793d57c6f97200cffd3e567430ee27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Monnom?= Date: Tue, 19 Dec 2023 21:09:04 +0100 Subject: [PATCH] move libwebrtc logs to debug (#270) --- libwebrtc/src/native/peer_connection_factory.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/libwebrtc/src/native/peer_connection_factory.rs b/libwebrtc/src/native/peer_connection_factory.rs index 12da694c..7ec81cb6 100644 --- a/libwebrtc/src/native/peer_connection_factory.rs +++ b/libwebrtc/src/native/peer_connection_factory.rs @@ -46,22 +46,13 @@ impl Default for PeerConnectionFactory { fn default() -> Self { let mut log_sink = LOG_SINK.lock(); if log_sink.is_none() { - *log_sink = Some(sys_rtc::ffi::new_log_sink(|msg, severity| { + *log_sink = Some(sys_rtc::ffi::new_log_sink(|msg, _| { let msg = msg .strip_suffix("\r\n") .or(msg.strip_suffix('\n')) .unwrap_or(&msg); - let lvl = match severity { - sys_rtc::ffi::LoggingSeverity::Verbose => log::Level::Trace, - sys_rtc::ffi::LoggingSeverity::Info => log::Level::Debug, // Translte webrtc - // info to debug log level to avoid polluting the user logs - sys_rtc::ffi::LoggingSeverity::Warning => log::Level::Warn, - sys_rtc::ffi::LoggingSeverity::Error => log::Level::Error, - _ => log::Level::Debug, - }; - - log::log!(target: "libwebrtc", lvl, "{}", msg); + log::debug!("{}", msg); })); }