This commit is contained in:
divinerapier 2026-01-11 17:13:33 +08:00 committed by GitHub
commit ce2615f4fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

14
main.go
View File

@ -45,14 +45,12 @@ func main() {
l.Close()
}()
defer func() {
defer func() {
if err := recover(); err != nil {
l.Error("Panic: %v", err)
buf := make([]byte, 1024)
n := runtime.Stack(buf, false)
l.Error("Stack trace: \n%s", buf[:n])
}
}()
if err := recover(); err != nil {
l.Error("Panic: %v", err)
buf := make([]byte, 1024)
n := runtime.Stack(buf, false)
l.Error("Stack trace: \n%s", buf[:n])
}
}()
logger.InitLogger(config.GetLogLevel(), config.GetLogFile())