You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/06/04 01:50:29 UTC

svn commit: r1599839 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java

Author: mattsicker
Date: Tue Jun  3 23:50:29 2014
New Revision: 1599839

URL: http://svn.apache.org/r1599839
Log:
Revert that idea about the default name.

  - Going to add an optional Class attribute instead.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java?rev=1599839&r1=1599838&r2=1599839&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java Tue Jun  3 23:50:29 2014
@@ -38,10 +38,9 @@ public @interface Plugin {
     String EMPTY = Strings.EMPTY;
 
     /**
-     * Name of the plugin. If no name is specified, defaults to the simple class name of the annotated element.
-     * Note that this name is case-insensitive.
+     * Name of the plugin. Note that this name is case-insensitive.
      */
-    String name() default EMPTY;
+    String name();
 
     /**
      * Category to place the plugin under. Category names are case-sensitive.



Re: svn commit: r1599839 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java

Posted by Matt Sicker <bo...@gmail.com>.
Indeed.


On 3 June 2014 19:18, Ralph Goers <ra...@dslextreme.com> wrote:

> Similar to why I created @ConverterKeys for pattern converters I guess?
> That sounds correct.
>
> Ralph
>
> On Jun 3, 2014, at 5:07 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> I changed my mind on that and am adding a @ConvertType annotation that
> will be scanned at runtime. No changes to @Plugin or the annotation
> processor this way, too.
>
>
> On 3 June 2014 19:05, Ralph Goers <ra...@dslextreme.com> wrote:
>
>> Why would you add a class attribute when the annotation is annotating the
>> class and you can get it from that?
>>
>> Ralph
>>
>> On Jun 3, 2014, at 4:50 PM, mattsicker@apache.org wrote:
>>
>> > Author: mattsicker
>> > Date: Tue Jun  3 23:50:29 2014
>> > New Revision: 1599839
>> >
>> > URL: http://svn.apache.org/r1599839
>> > Log:
>> > Revert that idea about the default name.
>> >
>> >  - Going to add an optional Class attribute instead.
>> >
>> > Modified:
>> >
>>  logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
>> >
>> > Modified:
>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
>> > URL:
>> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java?rev=1599839&r1=1599838&r2=1599839&view=diff
>> >
>> ==============================================================================
>> > ---
>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
>> (original)
>> > +++
>> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
>> Tue Jun  3 23:50:29 2014
>> > @@ -38,10 +38,9 @@ public @interface Plugin {
>> >     String EMPTY = Strings.EMPTY;
>> >
>> >     /**
>> > -     * Name of the plugin. If no name is specified, defaults to the
>> simple class name of the annotated element.
>> > -     * Note that this name is case-insensitive.
>> > +     * Name of the plugin. Note that this name is case-insensitive.
>> >      */
>> > -    String name() default EMPTY;
>> > +    String name();
>> >
>> >     /**
>> >      * Category to place the plugin under. Category names are
>> case-sensitive.
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>


-- 
Matt Sicker <bo...@gmail.com>

Re: svn commit: r1599839 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java

Posted by Ralph Goers <ra...@dslextreme.com>.
Similar to why I created @ConverterKeys for pattern converters I guess? That sounds correct.

Ralph

On Jun 3, 2014, at 5:07 PM, Matt Sicker <bo...@gmail.com> wrote:

> I changed my mind on that and am adding a @ConvertType annotation that will be scanned at runtime. No changes to @Plugin or the annotation processor this way, too.
> 
> 
> On 3 June 2014 19:05, Ralph Goers <ra...@dslextreme.com> wrote:
> Why would you add a class attribute when the annotation is annotating the class and you can get it from that?
> 
> Ralph
> 
> On Jun 3, 2014, at 4:50 PM, mattsicker@apache.org wrote:
> 
> > Author: mattsicker
> > Date: Tue Jun  3 23:50:29 2014
> > New Revision: 1599839
> >
> > URL: http://svn.apache.org/r1599839
> > Log:
> > Revert that idea about the default name.
> >
> >  - Going to add an optional Class attribute instead.
> >
> > Modified:
> >    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> >
> > Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> > URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java?rev=1599839&r1=1599838&r2=1599839&view=diff
> > ==============================================================================
> > --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java (original)
> > +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java Tue Jun  3 23:50:29 2014
> > @@ -38,10 +38,9 @@ public @interface Plugin {
> >     String EMPTY = Strings.EMPTY;
> >
> >     /**
> > -     * Name of the plugin. If no name is specified, defaults to the simple class name of the annotated element.
> > -     * Note that this name is case-insensitive.
> > +     * Name of the plugin. Note that this name is case-insensitive.
> >      */
> > -    String name() default EMPTY;
> > +    String name();
> >
> >     /**
> >      * Category to place the plugin under. Category names are case-sensitive.
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
> 
> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>


Re: svn commit: r1599839 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java

Posted by Matt Sicker <bo...@gmail.com>.
I changed my mind on that and am adding a @ConvertType annotation that will
be scanned at runtime. No changes to @Plugin or the annotation processor
this way, too.


On 3 June 2014 19:05, Ralph Goers <ra...@dslextreme.com> wrote:

> Why would you add a class attribute when the annotation is annotating the
> class and you can get it from that?
>
> Ralph
>
> On Jun 3, 2014, at 4:50 PM, mattsicker@apache.org wrote:
>
> > Author: mattsicker
> > Date: Tue Jun  3 23:50:29 2014
> > New Revision: 1599839
> >
> > URL: http://svn.apache.org/r1599839
> > Log:
> > Revert that idea about the default name.
> >
> >  - Going to add an optional Class attribute instead.
> >
> > Modified:
> >
>  logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> >
> > Modified:
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> > URL:
> http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java?rev=1599839&r1=1599838&r2=1599839&view=diff
> >
> ==============================================================================
> > ---
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> (original)
> > +++
> logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> Tue Jun  3 23:50:29 2014
> > @@ -38,10 +38,9 @@ public @interface Plugin {
> >     String EMPTY = Strings.EMPTY;
> >
> >     /**
> > -     * Name of the plugin. If no name is specified, defaults to the
> simple class name of the annotated element.
> > -     * Note that this name is case-insensitive.
> > +     * Name of the plugin. Note that this name is case-insensitive.
> >      */
> > -    String name() default EMPTY;
> > +    String name();
> >
> >     /**
> >      * Category to place the plugin under. Category names are
> case-sensitive.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>


-- 
Matt Sicker <bo...@gmail.com>

Re: svn commit: r1599839 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java

Posted by Ralph Goers <ra...@dslextreme.com>.
Why would you add a class attribute when the annotation is annotating the class and you can get it from that?

Ralph

On Jun 3, 2014, at 4:50 PM, mattsicker@apache.org wrote:

> Author: mattsicker
> Date: Tue Jun  3 23:50:29 2014
> New Revision: 1599839
> 
> URL: http://svn.apache.org/r1599839
> Log:
> Revert that idea about the default name.
> 
>  - Going to add an optional Class attribute instead.
> 
> Modified:
>    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> 
> Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java
> URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java?rev=1599839&r1=1599838&r2=1599839&view=diff
> ==============================================================================
> --- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java (original)
> +++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/Plugin.java Tue Jun  3 23:50:29 2014
> @@ -38,10 +38,9 @@ public @interface Plugin {
>     String EMPTY = Strings.EMPTY;
> 
>     /**
> -     * Name of the plugin. If no name is specified, defaults to the simple class name of the annotated element.
> -     * Note that this name is case-insensitive.
> +     * Name of the plugin. Note that this name is case-insensitive.
>      */
> -    String name() default EMPTY;
> +    String name();
> 
>     /**
>      * Category to place the plugin under. Category names are case-sensitive.
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org