logger
A simple log library
Get
go get github.com/LyricTian/logger
Usage
package main
import (
"github.com/LyricTian/logger"
)
func main() {
log := logger.NewStdLogger(true, true, true, true, logger.TimeFlag)
log.Debugf("hello,%s", "world")
log.Tracef("hello,%s", "world")
log.Infof("hello,%s", "world")
log.Errorf("hello,%s", "world")
log.Fatalf("hello,%s", "world")
}
Features
- Based on the standard library log
- Support output to the console and file
MIT License
Copyright (c) 2017 LyricTian