-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use more slog, replacing logrus #150
Conversation
Codecov Report
@@ Coverage Diff @@
## main #150 +/- ##
==========================================
- Coverage 62.56% 62.55% -0.02%
==========================================
Files 147 147
Lines 12324 12317 -7
==========================================
- Hits 7711 7705 -6
+ Misses 3779 3778 -1
Partials 834 834
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
services/ivr/twiml/service.go
Outdated
@@ -14,6 +14,8 @@ import ( | |||
"strconv" | |||
"strings" | |||
|
|||
"log/slog" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put with other std lib deps
services/ivr/vonage/service.go
Outdated
@@ -18,6 +18,8 @@ import ( | |||
"strings" | |||
"time" | |||
|
|||
"log/slog" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
web/middleware.go
Outdated
@@ -47,7 +42,7 @@ func panicRecovery(next http.Handler) http.Handler { | |||
defer func() { | |||
if rvr := recover(); rvr != nil { | |||
debug.PrintStack() | |||
log.WithError(errors.New(fmt.Sprint(rvr))).Error("recovered from panic in web handling") | |||
slog.Error("recovered from panic in web handling", "error", errors.New(fmt.Sprint(rvr))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think errors.New(..)
is needed here since it's just going to log as a string...
No description provided.