Browse Source

Log rejected listener container tasks at warn level

Closes gh-27451
pull/27555/head
Juergen Hoeller 4 years ago
parent
commit
5cbc972a0d
  1. 8
      spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java

8
spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2020 the original author or authors. * Copyright 2002-2021 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.
@ -582,13 +582,13 @@ public abstract class AbstractJmsListeningContainer extends JmsDestinationAccess
/** /**
* Log a task that has been rejected by {@link #doRescheduleTask}. * Log a task that has been rejected by {@link #doRescheduleTask}.
* <p>The default implementation simply logs a corresponding message * <p>The default implementation simply logs a corresponding message
* at debug level. * at warn level.
* @param task the rejected task object * @param task the rejected task object
* @param ex the exception thrown from {@link #doRescheduleTask} * @param ex the exception thrown from {@link #doRescheduleTask}
*/ */
protected void logRejectedTask(Object task, RuntimeException ex) { protected void logRejectedTask(Object task, RuntimeException ex) {
if (logger.isDebugEnabled()) { if (logger.isWarnEnabled()) {
logger.debug("Listener container task [" + task + "] has been rejected and paused: " + ex); logger.warn("Listener container task [" + task + "] has been rejected and paused: " + ex);
} }
} }

Loading…
Cancel
Save