This commit is contained in:
kzkzzzz
2025-03-23 20:29:29 +08:00
parent 7e0bf82418
commit 9fd0eaadb8
14 changed files with 661 additions and 78 deletions

View File

@@ -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()
}