It would not create a new LoggerContext. But a ConfigurationSource represents 
an entire configuration. So calling initialize with it would cause a new 
Configuration to be created. So yes, all your existing LoggerConfigs would be 
replaced by the new configuration.  Loggers would be unaffected as those are 
created by the application calling LogManager.getLogger(). 

Ralph

> On Sep 27, 2020, at 8:45 AM, Jochen Wiedmann <[email protected]> 
> wrote:
> 
> Thanks, Ralph,
> 
> but that would create a new LoggerContext, wouldn't it? (Thus,
> invalidating my existing loggers.)
> 
> Jochen
> 
> On Sun, Sep 27, 2020 at 5:08 PM Ralph Goers <[email protected]> 
> wrote:
>> 
>> Try calling
>> 
>> Configurator.initialize(null, configurationSource);
>> 
>> Ralph
>> 
>>> On Sep 27, 2020, at 7:40 AM, Jochen Wiedmann <[email protected]> 
>>> wrote:
>>> 
>>> Hi,
>>> 
>>> in LoggerContext, I have
>>> 
>>>   void updateLoggers(Configuration);
>>> 
>>> I understand, that this method provides the means to change the logging
>>> configuration at runtime. Very well!
>>> 
>>> Problem is: I do not have a Configuration, but a ConfigurationSource.
>>> So, what to do?
>>> 
>>> Thanks,
>>> 
>>> Jochen
>>> 
>>> 
>>> --
>>> 
>>> Look, that's why there's rules, understand? So that you think before
>>> you break 'em.
>>> 
>>>   -- (Terry Pratchett, Thief of Time)
>>> 
>> 
>> 
> 
> 
> -- 
> 
> Look, that's why there's rules, understand? So that you think before
> you break 'em.
> 
>    -- (Terry Pratchett, Thief of Time)
> 


Reply via email to