Re: [Log4j] Groovy Configuration DSL

2019-05-27 Thread Matt Sicker
Update: latest patches for IntelliJ have made my computer functional again! Going to look at this again today. On Tue, May 7, 2019 at 10:11, Matt Sicker wrote: > A Kotlin DSL would be pretty awesome. We’d first need a good way to > generate all the relevant type metadata to do code generation. O

Re: [Log4j] Groovy Configuration DSL

2019-05-07 Thread Matt Sicker
A Kotlin DSL would be pretty awesome. We’d first need a good way to generate all the relevant type metadata to do code generation. Or it might work better for a scripted DSL since you’d be using actual types of things. On Tue, May 7, 2019 at 09:11, Raman Gupta wrote: > A follow-on feature could

Re: [Log4j] Groovy Configuration DSL

2019-05-07 Thread Raman Gupta
A follow-on feature could be a Kotlin DSL. Kotlin is fully typed, but with a lot of Groovy-like features that enable elegant DSLs. The Gradle team, for example, has created a Kotlin DSL that can be used instead of their Groovy DSL. I don't know the details of how it works, but IntelliJ is able to p

Re: [Log4j] Groovy Configuration DSL

2019-05-06 Thread Matt Sicker
I also tried to start this over the weekend, but IntelliJ or some related build tool is broken on my personal computer at the moment. Might need to wipe my old settings or something, though I wasn't able to figure out what the problem was. I tried using Netbeans instead, but I barely know how to us

Re: [Log4j] Groovy Configuration DSL

2019-05-04 Thread Matt Sicker
I've opened https://issues.apache.org/jira/browse/LOG4J2-2600 for this feature (wow, nice issue id). I'd open another for the scripted variant, but that is more open-ended, so it's still in discovery so to say. On Fri, 3 May 2019 at 18:22, Matt Sicker wrote: > > On Fri, 3 May 2019 at 18:16, Remko

Re: [Log4j] Groovy Configuration DSL

2019-05-03 Thread Matt Sicker
On Fri, 3 May 2019 at 18:16, Remko Popma wrote: > About Ralph’s concern, would it not be possible for the DSL to create actual > Appender and Layout objects? What prevents us from doing this? Nothing in particular. I just found it to be out of the scope of what I was proposing. It might turn out

Re: [Log4j] Groovy Configuration DSL

2019-05-03 Thread Remko Popma
I like the first syntax with the map-like API. About Ralph’s concern, would it not be possible for the DSL to create actual Appender and Layout objects? What prevents us from doing this? Remko > On May 4, 2019, at 3:25, Matt Sicker wrote: > > Second example was a typo it looks like. > > On

Re: [Log4j] Groovy Configuration DSL

2019-05-03 Thread Matt Sicker
Second example was a typo it looks like. On Fri, May 3, 2019 at 12:57, Ralph Goers wrote: > My only concern is that people might be expecting a DSL to create the > actual Appenders, Layouts, etc. where this will just be creating > configuration Nodes. That said, I don’t have a problem with it. I

Re: [Log4j] Groovy Configuration DSL

2019-05-03 Thread Ralph Goers
My only concern is that people might be expecting a DSL to create the actual Appenders, Layouts, etc. where this will just be creating configuration Nodes. That said, I don’t have a problem with it. I am not sure that your second example is valid since you are declaring an appender without an ap

Re: [Log4j] Groovy Configuration DSL

2019-05-03 Thread Ralph Goers
I don’t understand. We already support JSON. Ralph > On May 3, 2019, at 10:42 AM, Gary Gregory wrote: > > I am all for making configurations easier to author. Your examples are less > verbose than XML which is nice. I wonder if the same config would also look > nice in JSON. > > Gary (on my ph

Re: [Log4j] Groovy Configuration DSL

2019-05-03 Thread Gary Gregory
I am all for making configurations easier to author. Your examples are less verbose than XML which is nice. I wonder if the same config would also look nice in JSON. Gary (on my phone ATM) On Fri, May 3, 2019, 13:08 Matt Sicker wrote: > I believe Ralph has brought up a feature request in the pa

[Log4j] Groovy Configuration DSL

2019-05-03 Thread Matt Sicker
I believe Ralph has brought up a feature request in the past, though I don't remember where. Anyways, Logback has a Groovy DSL [1] as an option to configure itself, and we could introduce a similar feature built on top of the existing ConfigurationBuilder code from the Java DSL in log4j-core. After