[jira] [Commented] (LOG4J2-468) Dynamically (programmatically) add logger in Log4j2

2014-05-30 Thread Girfas (JIRA)
[ https://issues.apache.org/jira/browse/LOG4J2-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14013585#comment-14013585 ] Girfas commented on LOG4J2-468: --- Hi Ralph, Can you give me the link to this fix on log4j2? I

PluginAttribute#defaultEnum()?

2014-05-30 Thread Gary Gregory
I added PluginAttribute#defaultClass() since we can have a Class has an attribute value. One can also have an Enum as an attribute value, but what default should be use? Gary -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition

Re: Type converters and enum default values

2014-05-30 Thread Gary Gregory
(Oops, I posted again on this same topic.) You can have an Enum as an annotation attribute, the question is then what should be the default value? Gary On Wed, May 28, 2014 at 8:33 AM, Matt Sicker boa...@gmail.com wrote: Yeah, you'd use the defaultStringValue. It'll get converted via

Re: org.apache.logging.log4j.core.config.plugins.PluginAttribute.value()

2014-05-30 Thread Gary Gregory
Hm... annotations do not work like that, if we renamed 'value' to 'name', you cannot use the short hand @PluginElement(Layout), you'd have to use @PluginElement(name = Layout) So I think we can drop this discussion... check? Gary On Wed, May 28, 2014 at 12:12 AM, Gary Gregory

Re: PluginAttribute#defaultEnum()?

2014-05-30 Thread Matt Sicker
I had the same hold-up when thinking about adding that, too. How about RetentionPolicy.SOURCE? Or ElementType.TYPE? Something annotation-related like that. On 30 May 2014 13:12, Gary Gregory garydgreg...@gmail.com wrote: I added PluginAttribute#defaultClass() since we can have a Class has an

Re: org.apache.logging.log4j.core.config.plugins.PluginAttribute.value()

2014-05-30 Thread Matt Sicker
I think as long as we add a javadoc (if it's not already there) to the value() method, then we're good to go! On 30 May 2014 13:32, Gary Gregory garydgreg...@gmail.com wrote: Hm... annotations do not work like that, if we renamed 'value' to 'name', you cannot use the short hand

Re: PluginAttribute#defaultEnum()?

2014-05-30 Thread Gary Gregory
Seems ok. I picked Object.class for Class. Gary div Original message /divdivFrom: Matt Sicker boa...@gmail.com /divdivDate:05/30/2014 16:24 (GMT-05:00) /divdivTo: Log4J Developers List log4j-dev@logging.apache.org /divdivSubject: Re: PluginAttribute#defaultEnum()? /divdiv

Re: org.apache.logging.log4j.core.config.plugins.PluginAttribute.value()

2014-05-30 Thread Paul Benedict
I don't see the added value in having defaultStringValue/defaultBooleanValue/defaultXYZValue. The complexity isn't justified, I think. Using a literal string is still much easier to comprehend; the type safety seems overkill. Cheers, Paul On Fri, May 30, 2014 at 3:25 PM, Matt Sicker

Re: org.apache.logging.log4j.core.config.plugins.PluginAttribute.value()

2014-05-30 Thread Matt Sicker
Well, if we can agree to use the builder class pattern instead of the factory method pattern, then default values are specified as default field values which are already typed perfectly fine as a language feature since day 1. I'll work on updating my proposal with the alternate annotations to

Re: PluginAttribute#defaultEnum()?

2014-05-30 Thread Gary Gregory
Hm... you cannot use Enum in the return type for an annotation attribute, only an actual enum, like RetentionPolicy. So it seems a no-go. Gary On Fri, May 30, 2014 at 4:24 PM, Matt Sicker boa...@gmail.com wrote: I had the same hold-up when thinking about adding that, too. How about

Re: PluginAttribute#defaultEnum()?

2014-05-30 Thread Paul Benedict
I think you guys are better off doing separate annotations to do strong typing. You could use a stereotyping pattern like Bean Validation spec. public @interface PluginAttribute ... Then annotate other annotations with that: @PluginAttribute public @interface IntPluginAttribute See how the Been

Re: PluginAttribute#defaultEnum()?

2014-05-30 Thread Gary Gregory
On Fri, May 30, 2014 at 9:39 PM, Paul Benedict pbened...@apache.org wrote: I think you guys are better off doing separate annotations to do strong typing. You could use a stereotyping pattern like Bean Validation spec. public @interface PluginAttribute ... Then annotate other annotations

Re: PluginAttribute#defaultEnum()?

2014-05-30 Thread Paul Benedict
Totally cleaner. On May 30, 2014 8:58 PM, Gary Gregory garydgreg...@gmail.com wrote: On Fri, May 30, 2014 at 9:39 PM, Paul Benedict pbened...@apache.org wrote: I think you guys are better off doing separate annotations to do strong typing. You could use a stereotyping pattern like Bean

Re: Clean up org.apache.logging.log4j.Marker.getParent()

2014-05-30 Thread Bruce Brouwer
Oh yeah. I've been having too much fun lately with the kids and the beautiful spring weather. I need to get back to this. On Sun, May 25, 2014 at 1:08 AM, Matt Sicker boa...@gmail.com wrote: Looking forward to the new work! ;) On 19 May 2014 22:40, Bruce Brouwer bruce.brou...@gmail.com