Skip to content
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

[fix][misc] Honor dynamic log levels in log4j2.yaml #23847

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

nodece
Copy link
Member

@nodece nodece commented Jan 14, 2025

Motivation

When the log levels (pulsar.log.level and pulsar.log.root.level) are modified in the conf/log4j2.yaml during runtime, the change is not reflected in the logs as expected.

I found the pulsar script always passes the pulsar.log.level and pulsar.log.root.level, which led to this issue.

Modifications

  • Removed the error environment variable from the pulsar/Dockerfile.
  • A condition was added to include the -Dpulsar.log.level only if PULSAR_LOG_LEVEL is defined.
  • A condition was added to include the -Dpulsar.log.root.level only if PULSAR_LOG_ROOT_LEVEL is defined, and ensured PULSAR_LOG_ROOT_LEVEL fallback to PULSAR_LOG_LEVEL if not defined.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 14, 2025
@nodece nodece requested a review from lhotari January 14, 2025 10:23
@nodece nodece merged commit 492a869 into apache:master Jan 14, 2025
57 of 58 checks passed
@nodece nodece self-assigned this Jan 14, 2025
@nodece nodece added this to the 4.1.0 milestone Jan 14, 2025
@nodece nodece deleted the honor-dynamic-log-levels branch January 14, 2025 14:44
nodece added a commit that referenced this pull request Jan 15, 2025
Signed-off-by: Zixuan Liu <[email protected]>
(cherry picked from commit 492a869)
nodece added a commit that referenced this pull request Jan 15, 2025
Signed-off-by: Zixuan Liu <[email protected]>
(cherry picked from commit 492a869)
nodece added a commit that referenced this pull request Jan 15, 2025
Signed-off-by: Zixuan Liu <[email protected]>
(cherry picked from commit 492a869)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants