文件名称:golog:Golang的简单日志库
文件大小:6KB
文件格式:ZIP
更新时间:2024-06-14 17:14:04
Go
#golog Golang的简单日志库 ##案件 package main import ( "fmt" . "github.com/flike/golog" "os" ) func main() { path := "/tmp/test_log" os.RemoveAll(path) os.Mkdir(path, 0777) fileName := path + "/test.log" h, err := NewRotatingFileHandler(fileName, 1024*1024, 2) if err != nil { fmt.Println(err.Error()) } //GlobalLogger is a global variable GlobalLogger = New(h, Lfile|Ltime|Llevel) GlobalLog
【文件预览】:
golog-master
----handler.go(821B)
----log.go(6KB)
----log_test.go(1KB)
----filehandler.go(4KB)
----LICENSE.md(1KB)
----README.md(672B)