Correct log level

Issue: SPR-16528
This commit is contained in:
Rossen Stoyanchev 2018-03-01 15:52:26 -05:00
parent fa670dd07d
commit 36cfdf68b1
3 changed files with 10 additions and 6 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -190,6 +190,10 @@ public class ResponseBodyEmitter {
* Complete request processing. * Complete request processing.
* <p>A dispatch is made into the app server where Spring MVC completes * <p>A dispatch is made into the app server where Spring MVC completes
* asynchronous request processing. * 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() { public synchronized void complete() {
this.complete = true; this.complete = true;

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -457,8 +457,8 @@ public abstract class ResponseEntityExceptionHandler {
HttpServletRequest request = servletWebRequest.getRequest(); HttpServletRequest request = servletWebRequest.getRequest();
HttpServletResponse response = servletWebRequest.getResponse(); HttpServletResponse response = servletWebRequest.getResponse();
if (response != null && response.isCommitted()) { if (response != null && response.isCommitted()) {
if (logger.isErrorEnabled()) { if (logger.isDebugEnabled()) {
logger.error("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]"); logger.debug("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]");
} }
return null; return null;
} }

View File

@ -536,8 +536,8 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
if (!response.isCommitted()) { if (!response.isCommitted()) {
response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE); response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
} }
else if (logger.isErrorEnabled()) { else if (logger.isDebugEnabled()) {
logger.error("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]"); logger.debug("Async timeout for " + request.getMethod() + " [" + request.getRequestURI() + "]");
} }
return new ModelAndView(); return new ModelAndView();
} }