func (l *LogrusWrapper) UnwrapError(err error) {
	type stackTracer interface {
		StackTrace() errors.StackTrace
	}
	l.logger.Error(err)
	if err, ok := errors.Cause(err).(stackTracer); ok {
		st := err.StackTrace()
		extra := len(st) - l.maxDepth - 1
		if l.maxDepth > 0 && extra > 0 {
			l.logger.Printf("\t%+v", st[0:l.maxDepth])
			l.logger.Printf(" .....and %d more\n", extra)
			return
		}

		l.logger.Printf("\t%+v", st[0:])
	}
}
// UnwrapError prints an err message and it's stack trace if one is available.
// No more then maxDepth levels of the trace will be displayed, after which the
// number of remaining errors in the stack will be displayed.
UnwrapError prints an err message and it's stack trace if one is available.
No more then maxDepth levels of the trace will be displayed, after which the
number of remaining errors in the stack will be displayed.
// UnwrapError prints an err message and it ' s stack trace if one is available . // No more then maxDepth levels of the trace will be displayed after which the // number of remaining errors in the stack will be displayed .
func (l *LogrusWrapper) UnwrapError(err error) {
	type stackTracer interface {
		StackTrace() errors.StackTrace
	}
	l.logger.Error(err)
	if err, ok := errors.Cause(err).(stackTracer); ok {
		st := err.StackTrace()
		extra := len(st) - l.maxDepth - 1
		if l.maxDepth > 0 && extra > 0 {
			l.logger.Printf("\t%+v", st[0:l.maxDepth])
			l.logger.Printf(" .....and %d more\n", extra)
			return
		}
		l.logger.Printf("\t%+v", st[0:])
	}
}
func ( l * LogrusWrapper ) UnwrapError ( err error ) { type stackTracer interface { StackTrace ( ) errors . StackTrace } l . logger . Error ( err ) if err , ok := errors . Cause ( err ) . ( stackTracer ) ; ok { st := err . StackTrace ( ) extra := len ( st ) - l . maxDepth - 1 if l . maxDepth > 0 && extra > 0 { l . logger . Printf ( " \t " , st [ 0 : l . maxDepth ] ) l . logger . Printf ( " \n " , extra ) return } l . logger . Printf ( " \t " , st [ 0 : ] ) } }
UnwrapError prints an err message and it's stack trace if one is available.
UnwrapError prints an err message and it ' s stack trace if one is available .