update
This commit is contained in:
10
mylog/log.go
10
mylog/log.go
@@ -223,6 +223,16 @@ func GetLogger() *ZapLog {
|
||||
return globalLog
|
||||
}
|
||||
|
||||
func GetLoggerSkip(callSkip int) *ZapLog {
|
||||
sg := globalLog.sugarLog.WithOptions(
|
||||
zap.AddCallerSkip(callSkip),
|
||||
)
|
||||
|
||||
return &ZapLog{
|
||||
sugarLog: sg,
|
||||
}
|
||||
}
|
||||
|
||||
func Flush() {
|
||||
globalLog.Sync()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user