a2800276 / logrotation

simple go logrotation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple file rotations

Usage:

lr := Logrotation {
	"whatever",   // base filename: whatever.<YYYYMMDD-HHMMSS>.<suffix>
	"log",        // suffix       : <base filename>.<YYYYMMDD-HHMMSS>.log
	false,        // don't use a date based dir tree
	"./"          // base directory, defaults to "./"
}

log.SetOutput(lr)

TODO

  • more Tests
  • max size
  • compression and deletion
  • license

About

simple go logrotation


Languages

Language:Go 100.0%