Open source

logrustate

A log rotation tool that reads TOML or logrotate-style configuration

BetaRustMIT

About

logrustate is a log rotation tool similar to logrotate. It reads its settings from a TOML file or from classic logrotate.conf style syntax. It rotates logs by schedule or size, compresses them with gzip, and shows what it would do with --debug without touching any file. The project is in beta and supports only part of the logrotate directives.

Features

  • TOML configuration ([global] and [[entries]]) and classic logrotate.conf syntax
  • hourly, daily, weekly, monthly and yearly schedules with size, minsize and maxsize thresholds
  • gzip compression, delaycompress, copytruncate, dateext, olddir
  • prerotate, postrotate, sharedscripts and include
  • --debug dry-run mode that does not modify files, --force to rotate regardless of schedule

Requirements

Rust 1.85+ to build from source (edition 2024); Linux, macOS or Windows release binaries

Install

curl -fsSL https://raw.githubusercontent.com/Ankara-Software/logrustate/master/install.sh | sh
cargo install --git https://github.com/Ankara-Software/logrustate

Usage

logrustate /etc/logrustate.toml --debug
logrustate /etc/logrustate.toml --verbose
logrustate /etc/logrotate.conf --state ~/.logrustate-state --debug
GitHub repository
https://github.com/Ankara-Software/logrustate
Report an issue
https://github.com/Ankara-Software/logrustate/issues
Security policy
SECURITY.md
License file
LICENSE (MIT)
Last update

Want to contribute?

Bug reports and pull requests are handled on GitHub.