X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/a9bdccb79164a787b4f1a2c1579a95cf751aef40..6eaf9391526a808c0056427f056169311352446d:/hotline/panic.go 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())) } }