Merge pull request #655 from SoLongAndThanksForAllThePizza/flutter_desktop

fix: make sure env_logger only init once
This commit is contained in:
RustDesk 2022-05-30 13:57:58 +08:00 committed by GitHub
commit 3a1bbc260b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,7 +46,9 @@ fn initialize(app_dir: &str) {
#[cfg(any(target_os = "windows", target_os = "linux", target_os = "macos"))]
{
use hbb_common::env_logger::*;
init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "debug"));
if let Err(e) = try_init_from_env(Env::default().filter_or(DEFAULT_FILTER_ENV, "debug")) {
log::debug!("{}", e);
}
}
}