refactored logging initialization
This commit is contained in:
@@ -17,6 +17,14 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
func init() {
|
||||
log.SetFormatter(&log.TextFormatter{
|
||||
FullTimestamp: true,
|
||||
TimestampFormat: "2006-01-02 15:04:05",
|
||||
})
|
||||
log.SetLevel(log.InfoLevel)
|
||||
}
|
||||
|
||||
func toglog(l log.Level) glog.Lvl {
|
||||
switch l {
|
||||
case log.DebugLevel:
|
||||
|
||||
Reference in New Issue
Block a user