simple-file-rotation

Crates.iosimple-file-rotation
lib.rssimple-file-rotation
version0.3.4
sourcesrc
created_at2022-05-03 18:23:36.610388
updated_at2022-08-17 20:23:10.026669
descriptionA very simple file rotator.
homepage
repositoryhttps://github.com/rksm/simple-file-rotation
max_upload_size
id579971
size13,877
Robert Krahn (rksm)

documentation

https://docs.rs/simple-file-rotation/latest/simple_file_rotation/

README

simple-file-rotation

This is an implementation of simple FileRotation mechanism using only std. Given a file like my.log, it will copy that file to my.1.log, renaming a potentially pre-existing my.1.log to my.2.log. It accepts an optional number of max filesto keep. It will only rotate files when invoked, it will /not/ watch any files or do any kind of background processing.

use simple_file_rotation::{FileRotation};
FileRotation::new("my.log")
    .max_old_files(2)
    .rotate()?;

Why yet another file rotation library?

  • No additional dependencies.
  • No features I don't need.
Commit count: 13

cargo fmt