update flexi_logger to 0.27.3, android check path exist

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-11-11 09:47:16 +08:00
parent 45dbea57f1
commit 27716f077e
3 changed files with 7 additions and 3 deletions

View File

@@ -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"] }

View File

@@ -342,6 +342,10 @@ pub fn init_log(_is_async: bool, _name: &str) -> Option<flexi_logger::LoggerHand
// though async logger more efficient, but it also causes more problems, disable it for now
let mut logger_holder: Option<flexi_logger::LoggerHandle> = 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);
}