Programmatically Modifying the Current Configuration after Initialization

2018-02-08 Thread Mike Kienenberger
As others have reported in years past, the examples in the docs for Programmatically Modifying the Current Configuration after Initialization are out of date. They don't compile. They don't work (affect the existing logging) even if you do fix the errors. Here's my situation: I am working in

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-09 Thread Mike Kienenberger
itialize(“MyApp”, “app-log4j2.xml”); > > This will look for a file named app-log4j2.xml on the class path. > > Ralph > >> On Feb 8, 2018, at 1:28 PM, Mike Kienenberger <mkien...@gmail.com> wrote: >> >> As others have reported in years past, the examples in the

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-09 Thread Mike Kienenberger
> Ralph > >> On Feb 9, 2018, at 9:14 AM, Mike Kienenberger <mkien...@gmail.com> wrote: >> >> Doh! I thought you had provided me with the magic bullet. :) >> >> Ok. I'll back to programmically registering info read from my >> XmlConfiguration into

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-09 Thread Mike Kienenberger
ompositeConfiguration >> and then call Configurator.initialize(compositeConfiguration). >> >> Ralph >> >>> On Feb 9, 2018, at 9:03 AM, Mike Kienenberger <mkien...@gmail.com> wrote: >>> >>> Thanks, Ralph, >>> >>> While that does wo

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-09 Thread Mike Kienenberger
me, specificConfig); > } > specificConfig.setLevel(level); > loggerContext.updateLoggers(); > > see attachment for our full Log4j2Util code. > > Regards, > Volker > > > > 2018-02-08 21:28 GMT+01:00 Mike Kienenberger <mkien...@gmail.com>: >> >

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-09 Thread Mike Kienenberger
figuration is lost. > So I really wouldn’t recommend calling start. In fact, I really think the > approach of copying the current configuration and using the > CompositeConfiguration is the safest way to accomplish what you are wanting. > > Ralph > > > >> On Feb 9,

Re: Programmatically Modifying the Current Configuration after Initialization

2018-02-09 Thread Mike Kienenberger
or details on how it works. If you don’t like something in the way it >> works you can copy it, modify it, give it a new Plugin name and then >> configure it to be used. >> >> Ralph >> >>> On Feb 9, 2018, at 3:02 PM, Mike Kienenberger <mkien...@gma