Skip to content

Commit

Permalink
Correct log level
Browse files Browse the repository at this point in the history
Issue: SPR-16528
  • Loading branch information
rstoyanchev committed Mar 1, 2018
1 parent fa670dd commit 36cfdf6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -190,6 +190,10 @@ private void sendInternal(Object object, @Nullable MediaType mediaType) throws I
* Complete request processing.
* <p>A dispatch is made into the app server where Spring MVC completes
* asynchronous request processing.
* <p><strong>Note:</strong> you do not need to call this method after an
* {@link IOException} from any of the {@code send} methods. The Servlet
* container will generate an error notification that Spring MVC will process
* and handle through the exception resolver mechanism and then complete.
*/
public synchronized void complete() {
this.complete = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -457,8 +457,8 @@ protected ResponseEntity<Object> handleAsyncRequestTimeoutException(
HttpServletRequest request = servletWebRequest.getRequest();
HttpServletResponse response = servletWebRequest.getResponse();
if (response != null && response.isCommitted()) {
if (logger.isErrorEnabled()) {
logger.error("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]");
if (logger.isDebugEnabled()) {
logger.debug("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]");
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,8 +536,8 @@ protected ModelAndView handleAsyncRequestTimeoutException(AsyncRequestTimeoutExc
if (!response.isCommitted()) {
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
}
else if (logger.isErrorEnabled()) {
logger.error("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]");
else if (logger.isDebugEnabled()) {
logger.debug("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]");
}
return new ModelAndView();
}
Expand Down

0 comments on commit 36cfdf6

Please sign in to comment.