Cronolog

Jul 20, 2023

Web log rotation utility that provides datestamp filenames

“cronolog” is a simple program that reads log messages from its input and writes them to a set of output files, the names of which are constructed using template and the current date and time.

“cronolog” is intended to be used in conjunction with a Web server, such as Apache to split the access log into daily or monthly logs. E.g.

TransferLog "|/www/sbin/cronolog /www/logs/Y/m/d/access.log"
ErrorLog    "|/www/sbin/cronolog /www/logs/Y/m/d/errors.log"

would instruct Apache to pipe its access and error log messages into separate copies of cronolog, which would create new log files each day in a directory hierarchy structured by date, i.e. on 31 December 1996 messages would be written to

/www/logs/1996/12/31/access.log
/www/logs/1996/12/31/errors.log

After midnight the following files would be used

/www/logs/1997/01/01/access.log
/www/logs/1997/01/01/errors.log


Checkout these related ports:
  • Zxfer - Easily and reliably transfer ZFS filesystems
  • Ztop - Display ZFS dataset I/O in real time
  • Zsm - ZFS Snapshot Manager
  • Zsd - Destroys ZFS snapshots
  • Zrepl - ZFS dataset replication tool
  • Zrep - ZFS based replication and failover solution
  • Zpool-iostat-viz - ZFS pool I/O latency statistics
  • Zoxide - Fast cd alternative that learns your habits
  • Zogftw - Creates redundant backups on encrypted ZFS pools
  • Znapzend - ZFS-centric backup tool
  • Zisofs-tools - User utilities for zisofs
  • Zidrav - File corruption detection and repair program
  • Zfstools - OpenSolaris-compatible auto snapshotting for ZFS
  • Zfsnap2 - Portable performant script to make rolling ZFS snapshots easy
  • Zfsnap - Simple sh script to make zfs rolling snaphosts with cron