GH-2536: Exclusive Consumer Logging Improvements#2537
Merged
artembilan merged 3 commits intospring-projects:mainfrom Oct 4, 2023
Merged
GH-2536: Exclusive Consumer Logging Improvements#2537artembilan merged 3 commits intospring-projects:mainfrom
artembilan merged 3 commits intospring-projects:mainfrom
Conversation
3b04f69 to
db9696a
Compare
artembilan
requested changes
Oct 3, 2023
| * @param message the message. | ||
| * @since 3.1 | ||
| */ | ||
| default void logRestart(Log logger, Supplier<String> message) { |
Member
There was a problem hiding this comment.
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.
artembilan
requested changes
Oct 4, 2023
| LogMessage.of(() -> "Restarting " + this.consumer)); | ||
| } | ||
| else { | ||
| logger.info("Restarting " + this.consumer); |
Member
There was a problem hiding this comment.
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()
Contributor
Author
There was a problem hiding this comment.
I will change it to a LogMessage too; I don't want to spend the effort to change to LogAccessor at this time.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2536
Log messages due to access refused due to exclusive consumers at DEBUG level instead of WARN and INFO.