mirror of
https://github.com/XShengTech/MEGREZ.git
synced 2026-01-14 00:57:17 +08:00
Merge 9a620e97bc into 2147f3876b
This commit is contained in:
commit
ce2615f4fd
14
main.go
14
main.go
@ -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())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user