mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
Output stack trace
This commit is contained in:
parent
1c7de425f7
commit
e1174bb67e
4
.gitignore
vendored
4
.gitignore
vendored
@ -21,4 +21,6 @@ _testmain.go
|
|||||||
|
|
||||||
*.exe
|
*.exe
|
||||||
*.test
|
*.test
|
||||||
config.json
|
config.json
|
||||||
|
*.swp
|
||||||
|
godns
|
||||||
|
2
godns.go
2
godns.go
@ -4,6 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
log "github.com/cihub/seelog"
|
log "github.com/cihub/seelog"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -39,6 +40,7 @@ func dns_loop(loop chan bool) {
|
|||||||
defer func() {
|
defer func() {
|
||||||
if err := recover(); err != nil {
|
if err := recover(); err != nil {
|
||||||
log.Error(err)
|
log.Error(err)
|
||||||
|
log.Info("Stack trace:\n" + string(debug.Stack()))
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user