Skip to content

SimpleMessageListenerContainer logging errors at DEBUG level #3008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
artembilan opened this issue Mar 10, 2025 · 0 comments
Closed

SimpleMessageListenerContainer logging errors at DEBUG level #3008

artembilan opened this issue Mar 10, 2025 · 0 comments

Comments

@artembilan
Copy link
Member

Discussed in #3007

Originally posted by raul-avila-ph March 10, 2025
As we explained in #3006, we had some issues trying to read the count field in x-death header. We have proposed a safer way to parse it.

When we had the problem in production, it took some time to be detected, as the ClassCastException was logged at DEBUG level:

In this discussion we'd like to ask you if it'd be possible for the framework to log this kind of errors at the WARN or ERROR level, maybe filtering out exceptions that shouldn't create unnecessary noise. The fact that a ClassCastException was only logged at DEBUG level made it invisible for our monitoring systems and it delayed the process to diagnose the problem.

@artembilan artembilan added this to the 4.0.0-M2 milestone Mar 10, 2025
spring-builds pushed a commit that referenced this issue Mar 10, 2025
Fixes: #3008
Issue link: #3008

The real problem  in consumer (e.g. `ClassCastException` mentioned in the issue)
might be lost if DEBUG logging level is not enabled

* Fix the first condition in the `SimpleMessageListenerContainer.logConsumerException()`
to use  `logger.warn()` as it was before #2278 fix

(cherry picked from commit b55010f)
spring-builds pushed a commit that referenced this issue Mar 10, 2025
Fixes: #3008
Issue link: #3008

The real problem  in consumer (e.g. `ClassCastException` mentioned in the issue)
might be lost if DEBUG logging level is not enabled

* Fix the first condition in the `SimpleMessageListenerContainer.logConsumerException()`
to use  `logger.warn()` as it was before #2278 fix

(cherry picked from commit b55010f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants