Skip to content

Add missing RootLogger.Builder withFilter alias - #4224

Open
Hashim1999164 wants to merge 2 commits into
apache:2.xfrom
Hashim1999164:fix/3369-rootlogger-withfilter-alias
Open

Add missing RootLogger.Builder withFilter alias#4224
Hashim1999164 wants to merge 2 commits into
apache:2.xfrom
Hashim1999164:fix/3369-rootlogger-withfilter-alias

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Jul 27, 2026

Copy link
Copy Markdown

Summary

LoggerConfig.Builder already exposes a deprecated withFilter(Filter) alias next to the misspelled withtFilter(Filter), but LoggerConfig.RootLogger.Builder only had withtFilter. This adds the matching withFilter alias so both builders behave the same way, keeps withtFilter as a deprecated wrapper around setFilter, and adds a small unit test for both call paths.

Fixes #3369

Test plan

  • Added LoggerConfigTest.testRootLoggerBuilderWithFilterAlias
  • CI LoggerConfigTest on this PR

RootLogger.Builder still lacked the correctly spelled withFilter method that LoggerConfig.Builder already exposes. Keep withtFilter as a deprecated wrapper and add a unit test covering both aliases.

Fixes apache#3369
@ramanathan1504

Copy link
Copy Markdown
Contributor

@Hashim1999164
Thanks for cleaning up this old typo, and welcome! I ran the tests locally, and it works perfectly. I just pushed a quick commit to your branch to adding Bnd and updated the changelog.

A quick checklist for future PRs:

  • Spotless: Read BUILDING.adoc and run ./mvnw spotless:apply.
  • Public APIs: If you touch a public API, remember to bump the package version in package-info.java to satisfy the Bnd baseline check.
  • Changelog: Keep changelog XML descriptions short and accurate.

Really appreciate your contribution here. LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

LoggerConfig.RootLogger.Builder#withtFilter (typo in method name / only partially fixed)

2 participants