optimize: merge channel availability log output and adjust log level - #8203
Open
shenshichao163-oss wants to merge 1 commit into
Open
optimize: merge channel availability log output and adjust log level#8203shenshichao163-oss wants to merge 1 commit into
shenshichao163-oss wants to merge 1 commit into
Conversation
- Change info level from LOGGER.error() to LOGGER.info() (summary without stack traces) - Change debug level from LOGGER.error() to LOGGER.debug() (per-address detailed stack traces) - All failed addresses merged into one log entry at info level - Change else-if to independent if blocks so both levels work independently Fixes apache#5474
1 task
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.
What this PR does
Optimizes the channel availability thread log output in
NettyClientChannelManager.Changes
LOGGER.error()toLOGGER.info()for the summary log, which outputs all failed addresses in a single entry without stack traces.LOGGER.error()toLOGGER.debug()for per-address detailed logs with full stack traces.failedMap.keySet()), instead of one log per failed address.else ifto two independentifblocks, so info and debug levels work independently rather than being mutually exclusive.Issue Link
Fixes #5474
Before
LOGGER.isInfoEnabled()→LOGGER.error()(wrong level, outputs error-level logs when info is enabled)else if LOGGER.isDebugEnabled()→LOGGER.error()(only reached when info is disabled)After
LOGGER.isInfoEnabled()→LOGGER.info()(summary, no stack traces)LOGGER.isDebugEnabled()→LOGGER.debug()(per-address detailed stack traces)Checklist