2
0

cleanup and module support (#77)

* cleanup and module support
This commit is contained in:
Lukas Rist
2020-10-21 16:19:57 +02:00
committed by GitHub
parent 94d9e492cc
commit 47ffae2331
8 changed files with 45 additions and 30 deletions
+3 -5
View File
@@ -1,19 +1,17 @@
package lumberjack_test
package lumberjack
import (
"log"
"gopkg.in/natefinch/lumberjack.v2"
)
// 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(&lumberjack.Logger{
log.SetOutput(&Logger{
Filename: "/var/log/myapp/foo.log",
MaxSize: 500, // megabytes
MaxBackups: 3,
MaxAge: 28, // days
MaxAge: 28, // days
Compress: true, // disabled by default
})
}