Skip to content

Commit

Permalink
Merge pull request #99 from Gawdl3y/feat/log-rotation
Browse files Browse the repository at this point in the history
Preserve older logs after rotation
  • Loading branch information
Gawdl3y authored Jan 2, 2024
2 parents 07a3d76 + 53134ae commit 222bc9b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/tauri-app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ fn main() -> anyhow::Result<()> {
},
#[cfg(not(debug_assertions))]
{
use tauri_plugin_log::RotationStrategy;

tauri_plugin_log::Builder::default()
.targets(vec![LogTarget::Stdout, LogTarget::LogDir])
.rotation_strategy(RotationStrategy::KeepAll)
.max_file_size(1024 * 256)
.level(log::LevelFilter::Debug)
.level_for(
"tao::platform_impl::platform::event_loop::runner",
Expand Down

0 comments on commit 222bc9b

Please sign in to comment.