set stacklevel

This commit is contained in:
jackdaw 2016-11-09 11:58:55 +09:00
parent 9818da5c38
commit 1d48dfc68b

5
log.go
View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"github.com/cihub/seelog" "github.com/cihub/seelog"
) )
//var logger seelog.LoggerInterface //var logger seelog.LoggerInterface
func LoadLogConfig(path string) error { func LoadLogConfig(path string) error {
@ -21,7 +22,7 @@ func LoadLogConfig(path string) error {
} }
seelog.ReplaceLogger(logger) seelog.ReplaceLogger(logger)
seelog.Current.SetAdditionalStackDepth(1)
return err return err
} }
@ -44,7 +45,6 @@ func Criticalf(format string, params ...interface{}) {
seelog.Criticalf(format, params) seelog.Criticalf(format, params)
} }
//func Fatalf(format string, params ...interface{}) { //func Fatalf(format string, params ...interface{}) {
// seelog.Criticalf(format, params) // seelog.Criticalf(format, params)
// os.Exit(1) // os.Exit(1)
@ -82,4 +82,3 @@ func Critical(v ...interface{}) {
func Flush() { func Flush() {
seelog.Flush() seelog.Flush()
} }