Skip to content

Commit

Permalink
chore: produce stacktrace logs
Browse files Browse the repository at this point in the history
  • Loading branch information
StarpTech committed Sep 18, 2024
1 parent 1571ea9 commit 2519c7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion router/internal/requestlogger/requestlogger.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fields = append(fields, zap.Bool("broken_pipe", brokenPipe))
h.logger.WithOptions(zap.AddStacktrace(zapcore.DPanicLevel)).Error(path, fields...)
} else {
h.logger.WithOptions(zap.AddStacktrace(zapcore.DPanicLevel)).Error("[Recovery from panic]", fields...)
h.logger.Error("[Recovery from panic]", fields...)
}

// rethrow the error to the recover middleware can handle it
Expand Down

0 comments on commit 2519c7c

Please sign in to comment.