logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Jaton <benjamin.ja...@gmail.com>
Subject Re: how to reinitialize log4j2 configuration?
Date Tue, 16 Jun 2015 21:44:56 GMT
This works great thanks!

On Fri, Jun 5, 2015 at 9:22 PM, Ralph Goers <ralph.goers@dslextreme.com>
wrote:

> Once you have a LoggerContext you can call
> context.setConfigLocation(configLocation) where configLocation is a URI.
> That will force a reconfiguration.
>
> Ralph
>
> > On Jun 5, 2015, at 4:33 PM, Benjamin Jaton <benjamin.jaton@gmail.com>
> wrote:
> >
> > Hello
> >
> > After an initial configuration of log4j2 with:
> >
> >    Configurator.initialize(null, configLocation);
> >
> > I would like to reinitialize it with a different URL
> >
> >    Configurator.initialize(null, configLocation2);
> >
> > The problem is that the second call is ignored. I believe that once the
> > LoggerContext is STARTED it will ignore reconfigurations.
> >
> > Is there a way to do this?
> >
> > Thanks!
> > Ben
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message