aboutsummaryrefslogtreecommitdiff
path: root/hotline/panic.go
diff options
context:
space:
mode:
Diffstat (limited to 'hotline/panic.go')
-rw-r--r--hotline/panic.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/hotline/panic.go b/hotline/panic.go
index e7c97db..d7376db 100644
--- a/hotline/panic.go
+++ b/hotline/panic.go
@@ -2,14 +2,14 @@ package hotline
import (
"fmt"
- "go.uber.org/zap"
+ "log/slog"
"runtime/debug"
)
// dontPanic logs panics instead of crashing
-func dontPanic(logger *zap.SugaredLogger) {
+func dontPanic(logger *slog.Logger) {
if r := recover(); r != nil {
fmt.Println("stacktrace from panic: \n" + string(debug.Stack()))
- logger.Errorw("PANIC", "err", r, "trace", string(debug.Stack()))
+ logger.Error("PANIC", "err", r, "trace", string(debug.Stack()))
}
}