Skip to content

[log] LogTarget::Folder max_file_size does not affect #707

Closed

Description

@8012311
builder.plugin(
                tauri_plugin_log::Builder::default()
                    .max_file_size(100)
                    .targets([LogTarget::Folder(&path)])
                    .rotation_strategy(RotationStrategy::KeepAll)
                    .level(LevelFilter::Debug)
                    .build(),
            );

the log file becomes ~1500 KB but still write there - no *.bac file created

Activity

  1. changed the title [-]tauri-plugin-log LogTarget::Folder max_file_size does not effect[/-] [+]tauri-plugin-log LogTarget::Folder max_file_size does not affect[/+] on Nov 8, 2023
  2. changed the title [-]tauri-plugin-log LogTarget::Folder max_file_size does not affect[/-] [+][log] LogTarget::Folder max_file_size does not affect[/+] on Nov 8, 2023
  3. yansenlei commented on Mar 26, 2024

    @yansenlei

    Any News?

  4. mlbishop commented on Jan 15, 2025

    @mlbishop

    +1. This still seems to be an issue. In my case, I notice that the log file size can grow beyond the configured max_file_size while the app is still running. However, when I close and re-open the app, it will rotate the log file if it has grown beyond the limit. Would it be possible to add live rotations?

  5. blim8183 commented on Apr 15, 2025

    @blim8183

    This is happening to me too. Any updates on this?

  6. JungleHH commented on Apr 21, 2025

    @JungleHH

    +1.

    tauri_plugin_log::Builder::new()
                    .target(tauri_plugin_log::Target::new(
                        tauri_plugin_log::TargetKind::LogDir { file_name: None },
                    ))
                    .max_file_size(50* 1024) 
                    .rotation_strategy(tauri_plugin_log::RotationStrategy::KeepAll) 
                    .level(log::LevelFilter::Error) 
                    .timezone_strategy(tauri_plugin_log::TimezoneStrategy::UseLocal)
                    .build()
    

    I use log = "0.4.27" and "@tauri-apps/plugin-fs": "^2.2.0"

  7. added a commit that references this issue on Nov 20, 2025
    ae278dd
  8. rkuzlik commented on Jan 6, 2026

    @rkuzlik

    @FabianLars, we need this fix urgently. When does V2.8.0 of the log plugin plan to be released?
    I see it is open: #3070

  9. FabianLars commented on Jan 6, 2026

    @FabianLars
    Member

    i'll try to squeeze it in this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions