Skip to content

Commit dff2a3d

Browse files
committed
Reduce logging level of EventListenerMethodProcessor
Reduce logging level when no target annotation is found a on bean. For consistency, update ScheduledAnnotationBeanPostProcessor and JmsListenerAnnotationBeanPostProcessor that define the same log statement. Issue: SPR-12574
1 parent 2dd5875 commit dff2a3d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

spring-context/src/main/java/org/springframework/context/event/EventListenerMethodProcessor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ protected void processBean(List<EventListenerFactory> factories, String beanName
128128
}
129129
if (annotatedMethods.isEmpty()) {
130130
this.nonAnnotatedClasses.add(type);
131-
if (logger.isDebugEnabled()) {
132-
logger.debug("No @EventListener annotations found on bean class: " + type);
131+
if (logger.isTraceEnabled()) {
132+
logger.trace("No @EventListener annotations found on bean class: " + type);
133133
}
134134
}
135135
else {

spring-context/src/main/java/org/springframework/scheduling/annotation/ScheduledAnnotationBeanPostProcessor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ public void doWith(Method method) throws IllegalArgumentException, IllegalAccess
231231
});
232232
if (annotatedMethods.isEmpty()) {
233233
this.nonAnnotatedClasses.add(targetClass);
234-
if (logger.isDebugEnabled()) {
235-
logger.debug("No @Scheduled annotations found on bean class: " + bean.getClass());
234+
if (logger.isTraceEnabled()) {
235+
logger.trace("No @Scheduled annotations found on bean class: " + bean.getClass());
236236
}
237237
}
238238
else {

spring-jms/src/main/java/org/springframework/jms/annotation/JmsListenerAnnotationBeanPostProcessor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,8 +208,8 @@ public void doWith(Method method) throws IllegalArgumentException, IllegalAccess
208208
});
209209
if (annotatedMethods.isEmpty()) {
210210
this.nonAnnotatedClasses.add(bean.getClass());
211-
if (logger.isDebugEnabled()) {
212-
logger.debug("No @JmsListener annotations found on bean class: " + bean.getClass());
211+
if (logger.isTraceEnabled()) {
212+
logger.trace("No @JmsListener annotations found on bean class: " + bean.getClass());
213213
}
214214
}
215215
else {

0 commit comments

Comments
 (0)