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 use it, so it felt like using vim for Java development.
I did some initial investigations, though, and noticed that DefaultConfigurationBuilder works differently than I expected. The declarative DSL might work more similarly to that class than I thought since it seems to build an equivalent XML tree, and the Groovy DSL could easily do the same thing (with convenience methods added for common configuration tasks potentially). For a more scripted approach, what I was thinking might work would be essentially making almost like a Spring Beans-like Groovy DSL for configuring Log4j components before returning the Configuration object itself. Making this work in a generic way that doesn't tie the user to internal plugin details (e.g., which factory method or builder was used to construct it) might be challenging, and that's why I consider it to be a separate feature that may be informed by the work done for declarative. On Sat, 4 May 2019 at 11:53, Matt Sicker <[email protected]> wrote: > > 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 <[email protected]> wrote: > > > > On Fri, 3 May 2019 at 18:16, Remko Popma <[email protected]> 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 to be relatively easy to support > > direct modification of the underlying plugin objects, too. I haven't > > tried it out yet, though I've gotten somewhat familiar with these > > Groovy features that can be used to do so. > > > > -- > > Matt Sicker <[email protected]> > > > > -- > Matt Sicker <[email protected]> -- Matt Sicker <[email protected]>
