logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Config element name confusion
Date Mon, 07 Jul 2014 16:57:44 GMT
This one would not need to be fixed:
org.apache.logging.log4j.core.appender.RollingFileAppender.createAppender:

    @PluginFactory
    public static RollingFileAppender createAppender(
...
            @PluginElement("Filter") final Filter filter,
...

So we do have some inconsistencies.


Gary


On Mon, Jul 7, 2014 at 12:37 PM, Gary Gregory <garydgregory@gmail.com>
wrote:

> I see:
>
>
> org.apache.logging.log4j.core.filter.CompositeFilter.createFilters(Filter[]):
>
>     @PluginFactory
>     public static CompositeFilter createFilters(@PluginElement("Filters")
> final Filter[] filters) {
>
> Which is clear, but then I see:
>
>     public static FileAppender createAppender(
>             // @formatter:off
> ...
>             @PluginElement("Filters") final Filter filter,
> ...
>
> So it seems like one filter elements (not arrays) should be renamed from
> "Filters" to "Filter".
>
> That or the discrepancy between the plural name and singular element needs
> to be in the Javadoc.
>
> Thoughts?
>
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
View raw message