Skip to content

Commit

Permalink
feat: log message that can be used to mark that this log is come from…
Browse files Browse the repository at this point in the history
… recover middleware
  • Loading branch information
mdanialr committed Oct 7, 2024
1 parent 3f61f02 commit 387e886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware/recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func Recover(c http.Context) {
defer func() {
// grab any panic occurring
if r := recover(); r != nil {
m := log.Map{"msg": debug.GetStackTraceInString(1)}
m := log.Map{"panic": "error panic recovered", "msg": debug.GetStackTraceInString(1)}
log.Runtime(c).Error(m)

prefixMsg := "Runtime Error - "
Expand Down

0 comments on commit 387e886

Please sign in to comment.