logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sicker <boa...@gmail.com>
Subject Re: org.apache.logging.log4j.core.config.plugins.PluginAttribute.value()
Date Wed, 28 May 2014 04:28:25 GMT
Would make sense for that annotation due to the default value things.


On 27 May 2014 23:12, Gary Gregory <garydgregory@gmail.com> wrote:

> PluginAttribute.value() looks misnamed, why not call it "name"?
>
> This is better:
>
>     @PluginFactory
>     public static ConsoleAppender createAppender(
>             @PluginElement("Layout") Layout<? extends Serializable> layout,
>             @PluginElement("Filters") final Filter filter,
>             @PluginAttribute(name= "target", defaultStringValue =
> "SYSTEM_OUT") final String targetStr,
>             @PluginAttribute("name") final String name,
>             @PluginAttribute(name= "follow", defaultBooleanValue = false)
> final String follow,
>             @PluginAttribute(name= "ignoreExceptions", defaultBooleanValue
> = true) final String ignore) {
>
> than:
>
>     @PluginFactory
>     public static ConsoleAppender createAppender(
>             @PluginElement("Layout") Layout<? extends Serializable> layout,
>             @PluginElement("Filters") final Filter filter,
>             @PluginAttribute(value = "target", defaultStringValue =
> "SYSTEM_OUT") final String targetStr,
>             @PluginAttribute("name") final String name,
>             @PluginAttribute(value = "follow", defaultBooleanValue =
> false) final String follow,
>             @PluginAttribute(value = "ignoreExceptions",
> defaultBooleanValue = true) final String ignore) {
>
> IMO that is...
>
> Gary
>
> --
> 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
>



-- 
Matt Sicker <boards@gmail.com>

Mime
View raw message