Skip to content

Commit

Permalink
fix: logic error on request_method logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mattnichols committed Oct 28, 2024
1 parent d3a71a4 commit 2239690
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public final void logRequest(Response response) {

Request request = response.getRequest();
MDC.put("request_method", request.getMethod());
if (Strings.isNullOrEmpty(request.getMethod())) {
if (!Strings.isNullOrEmpty(request.getMethod())) {
MDC.put("method", request.getMethod().toUpperCase()); // Duplicated and upcased for consistency with other logs
} else {
MDC.remove("method");
Expand Down

0 comments on commit 2239690

Please sign in to comment.