From 1178f7c892989ffc54bc361874d704210bdef617 Mon Sep 17 00:00:00 2001 From: huzibaca Date: Sat, 5 Oct 2024 12:19:44 +0800 Subject: [PATCH] refactor: init_log --- src-tauri/src/utils/init.rs | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src-tauri/src/utils/init.rs b/src-tauri/src/utils/init.rs index e56e771..5c0b9c6 100644 --- a/src-tauri/src/utils/init.rs +++ b/src-tauri/src/utils/init.rs @@ -44,21 +44,9 @@ fn init_log() -> Result<()> { let log_more = log_level == LevelFilter::Trace || log_level == LevelFilter::Debug; - #[cfg(feature = "verge-dev")] - { - logger_builder = logger_builder.appenders(["file", "stdout"]); - if log_more { - root_builder = root_builder.appenders(["file", "stdout"]); - } else { - root_builder = root_builder.appenders(["stdout"]); - } - } - #[cfg(not(feature = "verge-dev"))] - { - logger_builder = logger_builder.appenders(["file"]); - if log_more { - root_builder = root_builder.appenders(["file"]); - } + logger_builder = logger_builder.appenders(["file"]); + if log_more { + root_builder = root_builder.appenders(["file"]); } let (config, _) = log4rs::config::Config::builder()