diff --git a/loggy.go b/loggy.go index ecd8b6f..11d14e7 100644 --- a/loggy.go +++ b/loggy.go @@ -213,9 +213,10 @@ func (l Logger) LogMsg(msg Log) { } // PanicSafe is a deferrable function to recover from a panic operation. -func (l Logger) PanicSafe() { +func (l Logger) PanicSafe(a ...interface{}) { if r := recover(); r != nil { - l.LogCritical(fmt.Sprintf("Panic detected: %+v", r)) + l.LogCritical("Panic detected: %+v", r) + l.LogCritical("Optional panic data: %+v", a...) } }