logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

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

Open JWT007 opened this issue 1 year ago • 3 comments

Log4j 2.24

In LoggerConfig.Builder, an original typo existed in the 'withtFilter' method (extra 't' in name).

This was fixed by deprecating the original method and adding the correct 'withFilter' method.

        /**  @deprecated Use {@link #withFilter(Filter)} instead  */
        @Deprecated
        public B withtFilter(final Filter filter) { ... }

        public B withFilter(final Filter filter) { ... }

However, it was not fixed in the nested LoggerConfig.RootLogger.Builder implementation - there the name is still incorrect.

The nested builder method should also be deprecated and 'withFilter' added to replace it with the correct name.

JWT007 avatar Jan 07 '25 10:01 JWT007

@JWT007,

Thanks! Do you mind making a PR with this change?

ppkarwasz avatar Jan 07 '25 15:01 ppkarwasz

@ppkarwasz - made quick change - PR workflow awaiting approval:

https://github.com/apache/logging-log4j2/pull/3372

JWT007 avatar Jan 08 '25 00:01 JWT007

@ppkarwasz - it took me a while but I added tthe change log entry for 2.25.0

I also fixed spotless problem and updated package versions for baseline

JWT007 avatar Feb 11 '25 19:02 JWT007