Mura Li d77176912b Use Go1.11 module (#5743) | 5 年之前 | |
---|---|---|
.. | ||
.gitignore | 5 年之前 | |
LICENSE | 5 年之前 | |
README.md | 5 年之前 | |
README_CN.md | 5 年之前 | |
dbwriter.go | 5 年之前 | |
filewriter.go | 5 年之前 | |
logext.go | 5 年之前 |
go get github.com/lunny/log
For Single File:
f, _ := os.Create("my.log")
log.Std.SetOutput(f)
For Multiple Writer:
f, _ := os.Create("my.log")
log.Std.SetOutput(io.MultiWriter(f, os.Stdout))
For log files by date or time:
w := log.NewFileWriter(log.FileOptions{
ByType:log.ByDay,
Dir:"./logs",
})
log.Std.SetOutput(w)
This repo is an extension of Golang log.
BSD License http://creativecommons.org/licenses/BSD/