-
Notifications
You must be signed in to change notification settings - Fork 626
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
GH-2536: Exclusive Consumer Logging Improvements #2537
Conversation
3b04f69
to
db9696a
Compare
* @param message the message. | ||
* @since 3.1 | ||
*/ | ||
default void logRestart(Log logger, Supplier<String> message) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use org.springframework.core.log.LogMessage
instead?
And then we won't need the next isDebugEnabled()
Resolves spring-projects#2536 Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.
LogMessage.of(() -> "Restarting " + this.consumer)); | ||
} | ||
else { | ||
logger.info("Restarting " + this.consumer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is moment when we can change that logger
to the LogAccessor
and use here a supplier variant?
Otherwise, consider to wrap it into isInfoEnabled()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will change it to a LogMessage
too; I don't want to spend the effort to change to LogAccessor
at this time.
Resolves #2536
Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.