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
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
> 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
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
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>:
>>
>
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,
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