Skip to content

Commit

Permalink
Suppress "broken pipe" exceptions (MID-4559)
Browse files Browse the repository at this point in the history
It is questionable whether we should explicitly log these ones anyway,
as are propagated upwards. Therefore lowering the priority to DEBUG.
  • Loading branch information
mederly committed May 24, 2018
1 parent 31fbadf commit 47442f6
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -62,13 +62,13 @@ public void init(FilterConfig config) throws ServletException {
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {

if(LOGGER.isTraceEnabled()){
if (LOGGER.isTraceEnabled()) {
long startTime = System.nanoTime();

try {
chain.doFilter(request, response);
} catch (IOException | ServletException | RuntimeException | Error e) {
LOGGER.error("Encountered exception: {}: {}", e.getClass().getName(), e.getMessage(), e);
LOGGER.debug("Encountered exception: {}: {}", e.getClass().getName(), e.getMessage(), e);
throw e;
}

Expand All @@ -85,7 +85,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
try {
chain.doFilter(request, response);
} catch (IOException | ServletException | RuntimeException | Error e) {
LOGGER.error("Encountered exception: {}: {}", e.getClass().getName(), e.getMessage(), e);
LOGGER.debug("Encountered exception: {}: {}", e.getClass().getName(), e.getMessage(), e);
throw e;
}
}
Expand Down

0 comments on commit 47442f6

Please sign in to comment.