Log stack when panic

This commit is contained in:
Ludovic Fernandez 2018-10-12 15:40:03 +02:00 committed by Traefiker Bot
parent 2c7b7cd6ca
commit 0335f6fba9
4 changed files with 43 additions and 19 deletions

View file

@ -145,7 +145,7 @@ func GoWithRecover(goroutine func(), customRecover func(err interface{})) {
func defaultRecoverGoroutine(err interface{}) {
log.Errorf("Error in Go routine: %s", err)
debug.PrintStack()
log.Errorf("Stack: %s", debug.Stack())
}
// OperationWithRecover wrap a backoff operation in a Recover