https://github.com/realzeitmedia/glogrotate
logrotate for go's glog directories
https://github.com/realzeitmedia/glogrotate
glog go logging logrotate
Last synced: 5 months ago
JSON representation
logrotate for go's glog directories
- Host: GitHub
- URL: https://github.com/realzeitmedia/glogrotate
- Owner: realzeitmedia
- License: isc
- Created: 2015-05-29T08:55:40.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-08T06:56:13.000Z (almost 11 years ago)
- Last Synced: 2024-06-20T02:05:43.208Z (about 2 years ago)
- Topics: glog, go, logging, logrotate
- Language: Go
- Size: 137 KB
- Stars: 18
- Watchers: 6
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
glogrotate
# what
Gzip and remove logs generated by Go's glog: https://github.com/golang/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.
# how
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.