From 27716f077e7b960894472b9cdfda678d3e312161 Mon Sep 17 00:00:00 2001 From: 21pages Date: Sat, 11 Nov 2023 09:47:16 +0800 Subject: [PATCH] update flexi_logger to 0.27.3, android check path exist Signed-off-by: 21pages --- Cargo.lock | 4 ++-- libs/hbb_common/Cargo.toml | 2 +- libs/hbb_common/src/lib.rs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 980832b5a..934af3701 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2017,9 +2017,9 @@ dependencies = [ [[package]] name = "flexi_logger" -version = "0.25.6" +version = "0.27.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84075a94fd76ea9b7a0d2c257444ae30356e58fdac6cd0fe68af33f5279981ae" +checksum = "2ac35b454b60e1836602173e2eb7ef531173388c0212e02ec7f9fac086159ee5" dependencies = [ "chrono", "crossbeam-channel", diff --git a/libs/hbb_common/Cargo.toml b/libs/hbb_common/Cargo.toml index a9d11a244..2af73383f 100644 --- a/libs/hbb_common/Cargo.toml +++ b/libs/hbb_common/Cargo.toml @@ -7,7 +7,7 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -flexi_logger = { version = "0.25", features = ["async"] } +flexi_logger = { version = "0.27", features = ["async"] } protobuf = { version = "3.2", features = ["with-bytes"] } tokio = { version = "=1.28.1", features = ["full"] } tokio-util = { version = "0.7", features = ["full"] } diff --git a/libs/hbb_common/src/lib.rs b/libs/hbb_common/src/lib.rs index b8a7f4f2f..c3f5301f6 100644 --- a/libs/hbb_common/src/lib.rs +++ b/libs/hbb_common/src/lib.rs @@ -342,6 +342,10 @@ pub fn init_log(_is_async: bool, _name: &str) -> Option = None; let mut path = config::Config::log_path(); + #[cfg(target_os = "android")] + if !config::Config::get_home().exists() { + return None; + } if !_name.is_empty() { path.push(_name); }