mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-10-22 08:17:57 +00:00
fix(logging): suppress hyper_util debug logs
This commit is contained in:
1 parent
f0f1548ba3
commit
24aa2f6947
1 file changed
+2
-2
+2
-2
@@ -437,7 +437,7 @@ pub fn init_log(_is_async: bool, _name: &str) -> Option<flexi_logger::LoggerHand
|
|||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
{
|
{
|
||||||
use env_logger::*;
|
use env_logger::*;
|
||||||
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info,reqwest=warn,rustls=warn,webrtc-sctp=warn,webrtc=warn,webrtc_ice::agent::agent_internal=error,webrtc::peer_connection=error"));
|
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "info,reqwest=warn,hyper_util=warn,rustls=warn,webrtc-sctp=warn,webrtc=warn,webrtc_ice::agent::agent_internal=error,webrtc::peer_connection=error"));
|
||||||
}
|
}
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
{
|
{
|
||||||
@@ -452,7 +452,7 @@ pub fn init_log(_is_async: bool, _name: &str) -> Option<flexi_logger::LoggerHand
|
|||||||
path.push(_name);
|
path.push(_name);
|
||||||
}
|
}
|
||||||
use flexi_logger::*;
|
use flexi_logger::*;
|
||||||
if let Ok(x) = Logger::try_with_env_or_str("debug,reqwest=warn,rustls=warn,webrtc-sctp=warn,webrtc=warn,webrtc_ice::agent::agent_internal=error,webrtc::peer_connection=error") {
|
if let Ok(x) = Logger::try_with_env_or_str("debug,reqwest=warn,hyper_util=warn,rustls=warn,webrtc-sctp=warn,webrtc=warn,webrtc_ice::agent::agent_internal=error,webrtc::peer_connection=error") {
|
||||||
logger_holder = x
|
logger_holder = x
|
||||||
.log_to_file(FileSpec::default().directory(path))
|
.log_to_file(FileSpec::default().directory(path))
|
||||||
.write_mode(if _is_async {
|
.write_mode(if _is_async {
|
||||||
|
|||||||
Reference in new issue
Block a user