Please feel free to record your feature request in JIRA:
https://issues.apache.org/jira/browse/LOG4J2

Gary

On Thu, Nov 17, 2016 at 7:47 AM, COHEN, STEVEN M <sc1...@att.com> wrote:

> Thanks, that almost works for me, and will have to do, I suppose.  The
> problem is that I was hoping to be able to load each subconfig in first,
> filtering in any property definitions, which would then lead to writable
> output that would not contain properties, but their expanded values.  It
> would seem that with this approach, it would almost be better to not use
> properties at all in the subconfigs.
>
> I guess this would have to be a feature request, but in the meantime I
> might give CompositeConfiguration a try.
>
> -----Original Message-----
> From: Matt Sicker [mailto:boa...@gmail.com]
> Sent: Thursday, November 17, 2016 9:34 AM
> To: Log4J Users List <log4j-user@logging.apache.org>
> Subject: Re: Copying appenders and loggers from a confgiruation to a
> builder
>
> I don't believe there is an API in ConfigurationBuilder that uses actual
> plugin objects. That would certainly be a new feature. However, you did
> mention combining configuration files which is already implemented through
> composite configuration:
> http://logging.apache.org/log4j/2.x/manual/configuration.html#
> CompositeConfiguration
>
> On 17 November 2016 at 09:29, COHEN, STEVEN M <sc1...@att.com> wrote:
>
> > I am trying to construct a program that basically reads a bunch of
> > log4j2 configuration files and combines them into one, writing this
> > back to disk using the new
> > ConfigurationBuilder.writeXmlConfiguration(OutputStream)
> > method.
> >
> > But I run up against what seems to me to be a gap in the API unless I
> > am missing something:
> > Having created a ConfigurationBuilder for the destination file and
> > having read one of the to-be-combined configuration files into a
> > Configuration object, there appears to be nothing in the
> > ConfigurationBuilder interface that would allow, say, one of the
> > appenders from the read-in configuration to be copied, as a whole
> > object,into the builder, short of deconstructing it down to its
> constituent elements and adding them one by one.
> >
> > Is there a way to copy an appender from one configuration to another
> > without drilling down into all its constituent parts?  And similarly,
> > a way to copy a logger from one configuration to another without
> > drilling down to its constituent parts?  Or must I write all this code
> myself?
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
> >
>
>
> --
> Matt Sicker <boa...@gmail.com>
>



-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
<https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
JUnit in Action, Second Edition
<https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>

<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
Spring Batch in Action
<https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
<http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to