Skip to content

KAFKA-19499: Corrected the logger name in PersisterStateManagerHandler #20175

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

Merged
merged 3 commits into from
Jul 24, 2025

Conversation

chirag-wadhwa5
Copy link
Contributor

@chirag-wadhwa5 chirag-wadhwa5 commented Jul 16, 2025

This PR corrects the name of logger in the inner class
PersisterStateManagerHandler. After this change it will be possible to
change the log level dynamically in the kafka brokers. This PR also
includes a small change in a log line in GroupCoordinatorService, making
it clearer.

Reviewers: Apoorv Mittal apoorvmittal10@gmail.com, Sushant Mahajan smahajan@confluent.io, Lan Ding isDing_L@163.com, TengYao Chi frankvicky@apache.org

@github-actions github-actions bot added triage PRs from the community core Kafka Broker group-coordinator small Small PRs labels Jul 16, 2025
@apoorvmittal10 apoorvmittal10 added KIP-932 Queues for Kafka ci-approved and removed triage PRs from the community labels Jul 16, 2025
@apoorvmittal10
Copy link
Contributor

@chirag-wadhwa5 The build is failing with Persister tests, can you please fix.

@chirag-wadhwa5 chirag-wadhwa5 changed the title Corrected the logger name in PersisterStateManagerHandler KAFKA-19499: Corrected the logger name in PersisterStateManagerHandler Jul 16, 2025
@chirag-wadhwa5
Copy link
Contributor Author

Thanks for the review @apoorvmittal10 . I have pushed the required changes. The new build report has only unrelated failures.

Copy link
Contributor

@DL1231 DL1231 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch, LGTM.
nit: "it will be possible t" -> "it will be possible to"

Copy link
Contributor

@frankvicky frankvicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chirag-wadhwa5: This patch LGTM.
Could you please merge the trunk?
The failed test should have been fixed on the trunk..

Copy link
Collaborator

@smjn smjn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, LGTM

Copy link
Contributor

@apoorvmittal10 apoorvmittal10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, probably do it with some other commit in future, if you think that's right. LGTM!

Comment on lines +240 to +244
String canonicalName = getClass().getCanonicalName();
if (canonicalName == null) {
canonicalName = getClass().getName();
}
log = LoggerFactory.getLogger(canonicalName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: probaly can do later as well. Becuase now it's not always the canonical name in the variable.

Suggested change
String canonicalName = getClass().getCanonicalName();
if (canonicalName == null) {
canonicalName = getClass().getName();
}
log = LoggerFactory.getLogger(canonicalName);
String name = getClass().getCanonicalName();
if (name == null) {
name = getClass().getName();
}
log = LoggerFactory.getLogger(name);

@apoorvmittal10 apoorvmittal10 merged commit 1ae4173 into apache:trunk Jul 24, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved core Kafka Broker group-coordinator KIP-932 Queues for Kafka small Small PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants