package main
import (
"log"
"github.com/gookit/slog/rotatefile"
)
func main() {
logFile := "testdata/go_logger.log"
writer, err := rotatefile.NewConfig(logFile).Create()
if err != nil {
panic(err)
}
log.SetOutput(writer)
log.Println("log message")
}
rotatefile
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||