Skip to content

Commit

Permalink
added auth header in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
harshjohar committed Jan 31, 2024
1 parent 953d48d commit b1256fa
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/com/pecacm/backend/util/LoggingInterceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ public class LoggingInterceptor implements HandlerInterceptor {
private static final Logger logger = LoggerFactory.getLogger(LoggingInterceptor.class);

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
// Log request details
logger.info("Received request: {} {} from {}", request.getMethod(), request.getRequestURI(), request.getRemoteAddr());
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) {
logger.info("Received request: {} {} Authorization={}", request.getMethod(), request.getRequestURI(), request.getHeader("Authorization"));
return true;
}

Expand Down

0 comments on commit b1256fa

Please sign in to comment.