#logging is duplicated

3 messages · Page 1 of 1 (latest)

dusk tulip
#

somehow logging shown twice in the stdout, i've tried to removed the tauri_plugin_log::builder part and the log dissapears, so its not accidentally registered twice. Any ideas?

tauri::Builder::default()
        .plugin(tauri_plugin_updater::Builder::new().build())
        .plugin(tauri_plugin_dialog::init())
        .setup(|app| {
            let manager = AppData {
                manager: Arc::new(Mutex::new(WorkerManager::default())),
            };
            app.manage(manager);

            if cfg!(debug_assertions) {
                std::env::set_var("RUST_BACKTRACE", "1");
                app.handle().plugin(
                    tauri_plugin_log::Builder::default()
                        .level(log::LevelFilter::Info)
                        .target(Target::new(TargetKind::Stdout))
                        .build(),
                )?;
            } else {
                app.handle().plugin(
                    tauri_plugin_log::Builder::default()
                        .level(log::LevelFilter::Info)
                        .target(Target::new(TargetKind::LogDir {
                            file_name: Some("app.log".to_string()),
                        }))
                        .build(),
                )?;
            }
            Ok(())
        })
        .run(tauri::generate_context!())
neat pilot
#

does this only happen with the Stdout target or does it also print everything twice into a file?