Skip to content

feat: add possibility to customize logger in log4j #2151

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

Open
wants to merge 1 commit into
base: 7.1.x
Choose a base branch
from

Conversation

sebfortier2288
Copy link
Contributor

Description

We need the possiblity to override more the just the root logger in the log4j file for kafka broker.
This PR add the possiblity to override a list of loggers using the update_log4j task in the common role.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

This has been deployed using our forked repo in our environments.
Like this:

kafka_broker_log4j_replace_loggers:
  - { logger: "kafka", value: "INFO" }
  - { logger: "org.apache.kafka", value: "INFO" }

Checklist:

  • Any variable/code changes have been validated to be backwards compatible (doesn't break upgrade)
  • I have added tests that prove my fix is effective or that my feature works
  • If required, I have ensured the changes can be discovered by cp-ansible discovery codebase
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

@sebfortier2288 sebfortier2288 requested a review from a team as a code owner June 26, 2025 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant