Skip to content

Commit

Permalink
use error log level
Browse files Browse the repository at this point in the history
  • Loading branch information
anuvedverma committed Jul 1, 2024
1 parent 6718de0 commit 28bde1d
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,20 @@ protected void postConnectionHook(
log.error("Exception occurred while processing request URL: {} , request URI {} ,"
+ " servlet path {} , toString {}", request.getRequestURL(),
request.getRequestURI(), request.getServletPath(), request.toString(), var9);
debugLogHeaders(request);
errorLogHeaders(request);
callback.failed(var9);
}
}

protected void errorLogHeaders(HttpServletRequest request) {
log.error("-------HttpServletRequest headers---------");
Enumeration<String> headers = request.getHeaderNames();
while (headers.hasMoreElements()) {
String header = headers.nextElement();
log.error(header + "->" + request.getHeader(header));
}
}

protected void debugLogHeaders(HttpServletRequest request) {
if (log.isDebugEnabled()) {
log.debug("-------HttpServletRequest headers---------");
Expand Down

0 comments on commit 28bde1d

Please sign in to comment.