Skip to content
logrotate for go's glog directories
Go Makefile
Branch: master
Clone or download
Harmen nicer panics
Latest commit a07d0d5 Jul 8, 2015
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore working program + support files May 29, 2015
LICENSE Initial commit May 29, 2015
Makefile working program + support files May 29, 2015 Fix the documentation Jun 6, 2015
glogrotate.go nicer panics Jul 8, 2015



Gzip and remove logs generated by Go's glog:

It will figure out the date of the log entries from the filename. It won't touch files where the 'WARNING' and 'INFO' &c symlinks point to.


glogrotate -base=/var/log/ -maxage=$((30 * 24))h myapp myotherapp

It'll gzip all non-current files in

  • /var/log/myapp/*
  • /var/log/myotherapp/*

and delete INFO files older than 30 days, WARNING files older than 2 * 30 days, and ERROR files older than 3 * 30 days. See -help how to change the periods.

You can’t perform that action at this time.