Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rksm/simple-file-rotation
https://github.com/rksm/simple-file-rotation
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rksm/simple-file-rotation
- Owner: rksm
- License: mit
- Created: 2022-05-03T18:16:38.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-08-17T20:23:16.000Z (over 2 years ago)
- Last Synced: 2024-09-09T16:55:02.949Z (4 months ago)
- Language: Rust
- Size: 11.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-file-rotation
This is an implementation of simple [FileRotation](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.```rust
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.