chore: differentiate debug and release logging destination
This commit is contained in:
parent
38c7355e43
commit
c91cde3654
@ -50,15 +50,14 @@ pub fn run() {
|
|||||||
.setup(|app| {
|
.setup(|app| {
|
||||||
app.handle().plugin(
|
app.handle().plugin(
|
||||||
tauri_plugin_log::Builder::default()
|
tauri_plugin_log::Builder::default()
|
||||||
.targets([
|
.targets([if cfg!(debug_assertions) {
|
||||||
|
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stdout)
|
||||||
|
} else {
|
||||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Folder {
|
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Folder {
|
||||||
path: get_jan_data_folder_path(app.handle().clone()).join("logs"),
|
path: get_jan_data_folder_path(app.handle().clone()).join("logs"),
|
||||||
file_name: Some("app".to_string()),
|
file_name: Some("app".to_string()),
|
||||||
}),
|
})
|
||||||
if cfg!(debug_assertions) {
|
}])
|
||||||
tauri_plugin_log::Target::new(tauri_plugin_log::TargetKind::Stdout)
|
|
||||||
},
|
|
||||||
])
|
|
||||||
.build(),
|
.build(),
|
||||||
)?;
|
)?;
|
||||||
// Install extensions
|
// Install extensions
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user