Skip to content

[fix](be) Load JNI log4j2 properties config#63063

Merged
Gabriel39 merged 1 commit intoapache:masterfrom
Gabriel39:minor_0508
May 8, 2026
Merged

[fix](be) Load JNI log4j2 properties config#63063
Gabriel39 merged 1 commit intoapache:masterfrom
Gabriel39:minor_0508

Conversation

@Gabriel39
Copy link
Copy Markdown
Contributor

Issue Number: close #xxx

Related PR: #xxx

Problem Summary: ScannerLoader forced log4j2.xml even when the file-based log4j2.properties resource should be used, causing JNI logs to keep using the XML configuration.

None

  • Test: No need to test (single configuration file name change; not run)

  • Behavior changed: Yes (ScannerLoader now loads log4j2.properties instead of log4j2.xml)

  • Does this need documentation: No

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

Issue Number: close #xxx

Related PR: #xxx

Problem Summary: ScannerLoader forced log4j2.xml even when the file-based log4j2.properties resource should be used, causing JNI logs to keep using the XML configuration.

None

- Test: No need to test (single configuration file name change; not run)

- Behavior changed: Yes (ScannerLoader now loads log4j2.properties instead of log4j2.xml)

- Does this need documentation: No
@hello-stephen
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morningman
Copy link
Copy Markdown
Contributor

run buildall

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR approved by anyone and no changes requested.

@Gabriel39
Copy link
Copy Markdown
Contributor Author

/review

@Gabriel39 Gabriel39 merged commit 9ba7e04 into apache:master May 8, 2026
32 of 34 checks passed
github-actions Bot pushed a commit that referenced this pull request May 8, 2026
Problem Summary: ScannerLoader forced log4j2.xml even when the
file-based log4j2.properties resource should be used, causing JNI logs
to keep using the XML configuration.
github-actions Bot pushed a commit that referenced this pull request May 8, 2026
Problem Summary: ScannerLoader forced log4j2.xml even when the
file-based log4j2.properties resource should be used, causing JNI logs
to keep using the XML configuration.
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

No blocking findings found in this review.

Critical checkpoint conclusions:

  • Goal and test proof: The PR changes ScannerLoader to point Log4j2 at the existing log4j2.properties classpath resource and removes the stale log4j2.xml. This accomplishes the stated goal. No test was run, but the change is narrowly scoped to a resource name and stale resource removal.
  • Scope: The modification is small and focused.
  • Concurrency: No new concurrency or shared mutable lifecycle behavior is introduced.
  • Lifecycle/static initialization: The touched code is in an existing static initializer; the change only changes the configuration filename used before LoggerContext.reconfigure().
  • Configuration items: No Doris config item is added.
  • Compatibility/storage/protocol: No storage format, RPC, thrift, or mixed-version protocol behavior is changed.
  • Parallel paths: I found no remaining log4j2.xml references in fe/be-java-extensions/java-common; log4j2.properties is present in the module resources.
  • Special checks/error handling: No new checks or error-handling paths are added.
  • Test coverage: No tests were added or run; acceptable risk for this small packaging/logging resource correction, but runtime verification in the JNI scanner package would still be useful.
  • Observability: The change directly affects logging configuration; the existing initialization log remains.
  • Transaction/data correctness: Not applicable.
  • Performance: Not applicable.

User focus: No additional user-provided review focus was present.

yiguolei pushed a commit that referenced this pull request May 9, 2026
Cherry-picked from #63063

Co-authored-by: Gabriel <liwenqiang@selectdb.com>
yiguolei pushed a commit that referenced this pull request May 9, 2026
Cherry-picked from #63063

Co-authored-by: Gabriel <liwenqiang@selectdb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.0.6-merged dev/4.1.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants