Changed the log outputs in this PR to utilize log4j2 {} notation (as per

suggestion by A. Mashchenko and L. Lenart)
Changed the log outputs in this PR from info level to warn level (as per
 suggestion by L. Lenart).
Note: The info level was originally chosen to make it easier to filter out
in the very unlikely case of log flood.
This commit is contained in:
JCgH4164838Gh792C124B5
2019-09-17 21:10:34 -04:00
parent 220896a0cf
commit fcbd29b7f9
2 changed files with 6 additions and 6 deletions
@@ -97,10 +97,10 @@ public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler {
response.sendError(code, e.getMessage());
} catch (IOException e1) {
// we're already sending an error, not much else we can do if more stuff breaks
LOG.info("Unable to send error response, code: " + code + "! (IOException): " + e1);
LOG.warn("Unable to send error response, code: {}! (IOException): {}", code, e1.toString());
} catch (IllegalStateException ise) {
// Log illegalstate instead of passing unrecoverable exception to calling thread
LOG.info("Unable to send error response, code: " + code + "! isCommited: " + response.isCommitted() + " (IllegalStateException): " + ise);
LOG.warn("Unable to send error response, code: {}! isCommited: {}. (IllegalStateException): {}", code, response.isCommitted(), ise.toString());
}
}
@@ -126,10 +126,10 @@ public class DefaultDispatcherErrorHandler implements DispatcherErrorHandler {
response.sendError(code, "Unable to show problem report:\n" + exp + "\n\n" + LocationUtils.getLocation(exp));
} catch (IOException ex) {
// we're already sending an error, not much else we can do if more stuff breaks
LOG.info("Unable to send error response, code: " + code + "! (IOException): ", ex); // Stacktrace with DevMode
LOG.warn("Unable to send error response, code: {}! (IOException): {}", code, ex); // Stacktrace with DevMode
} catch (IllegalStateException ise) {
// Log illegalstate instead of passing unrecoverable exception to calling thread
LOG.info("Unable to send error response, code: " + code + "! isCommited: " + response.isCommitted() + " (IllegalStateException): ", ise); // Stacktrace with DevMode
LOG.warn("Unable to send error response, code: {}! isCommited: {}. (IllegalStateException): {}", code, response.isCommitted(), ise); // Stacktrace with DevMode
}
}
}
@@ -222,10 +222,10 @@ public class DefaultStaticContentLoader implements StaticContentLoader {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
} catch (IOException e1) {
// we're already sending an error, not much else we can do if more stuff breaks
LOG.info("Unable to send error response, code: " + HttpServletResponse.SC_NOT_FOUND + "! (IOException): " + e1);
LOG.warn("Unable to send error response, code: {}! (IOException): {}", HttpServletResponse.SC_NOT_FOUND, e1.toString());
} catch (IllegalStateException ise) {
// Log illegalstate instead of passing unrecoverable exception to calling thread
LOG.info("Unable to send error response, code: " + HttpServletResponse.SC_NOT_FOUND + "! isCommited: " + response.isCommitted() + " (IllegalStateException): " + ise);
LOG.warn("Unable to send error response, code: {}! isCommited: {}. (IllegalStateException): {}", HttpServletResponse.SC_NOT_FOUND, response.isCommitted(), ise.toString());
}
}