2
0
Files
lumberjack/example_test.go
Lukas Rist 47ffae2331 cleanup and module support (#77)
* cleanup and module support
2020-10-21 10:19:57 -04:00

18 lines
382 B
Go

package lumberjack
import (
"log"
)
// To use lumberjack with the standard library's log package, just pass it into
// the SetOutput function when your application starts.
func Example() {
log.SetOutput(&Logger{
Filename: "/var/log/myapp/foo.log",
MaxSize: 500, // megabytes
MaxBackups: 3,
MaxAge: 28, // days
Compress: true, // disabled by default
})
}