fix: avoid register logger when enable tracing feature

This commit is contained in:
Tunglies 2026-02-05 17:15:05 +08:00
parent c3f7ff7aa2
commit 781313e8f0
No known key found for this signature in database
GPG Key ID: B9B01B389469B3E8
3 changed files with 2 additions and 1 deletions

View File

@ -22,7 +22,6 @@ tauri-dev = []
tokio-trace = ["console-subscriber"]
clippy = ["tauri/test"]
tracing = []
tracing-full = []
[package.metadata.bundle]
identifier = "io.github.clash-verge-rev.clash-verge-rev"

View File

@ -68,6 +68,7 @@ impl Logger {
self.log_max_size.store(log_max_size, Ordering::SeqCst);
self.log_max_count.store(log_max_count, Ordering::SeqCst);
#[cfg(not(feature = "tokio-trace"))]
#[cfg(not(feature = "tauri-dev"))]
{
let log_spec = Self::generate_log_spec(log_level);

View File

@ -33,6 +33,7 @@ pub fn init_work_dir_and_logger() -> anyhow::Result<()> {
init_work_config().await;
init_resources().await;
logging!(info, Type::Setup, "Initializing logger");
// #[cfg(not(feature = "tokio-trace"))]
Logger::global().init().await?;
Ok(())
})