Skip to content

Repository files navigation

logrustate

A modern, drop-in replacement for logrotate — written in Rust.

Crates.io License: MIT Build GitHub Release

logrustate /etc/logrustate.toml --verbose

Why logrustate?

logrotate has been the de-facto log rotation tool on Linux since 1996. It works — but it was written in C, relies on crond, has a confusing config format, no dry-run mode, and cryptic errors.

logrustate is a modern replacement with a clean TOML config, verbose output, proper dry-run, and full compatibility with legacy logrotate.conf syntax.


Installation

⚡ Quick Install (Linux / macOS)

curl -fsSL https://raw.githubusercontent.com/anilcan-kara/logrustate/master/install.sh | sh

Cargo

cargo install logrustate

Quick Start

Create a TOML config

# /etc/logrustate.toml

[[logs]]
path = "/var/log/nginx/access.log"
rotate = 7          # keep 7 rotated files
compress = true     # gzip after rotation
daily = true        # rotate daily
missingok = true    # don't error if file is missing
notifempty = true   # skip rotation if log is empty

Preview without changes (dry-run)

logrustate /etc/logrustate.toml --debug

Contributing

See CONTRIBUTING.md. All PRs welcome.


License

MIT © Anilcan Kara

About

A modern, drop-in replacement for logrotate — written in Rust

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages