Re: Fwd: Temporarily store/restore the current configuration

Dawid Weiss <[email protected]>
Newsgroups gmane.comp.jakarta.log4j.user
Message-ID <CAM21Rt_mOzj3X5RHSBJ4c552kD2t7QJ57ERHtwYNe2w6aLd-wA@mail.gmail.com>
Hi Chris!

Small world, eh? :)

Dawid: The piece you're missing is LoggerContext.updateLoggers(...)


I did that too... I think. I have dynamic appender redirection (teeing) in
another place - this is where updateLoggers() is used. But this time I
wanted to swap out entire configurations (this may involve different logger
setup, appenders, etc.) and could't make it work properly, no matter what.
I'll go back to the drawing board and retry.

I do understand it's not a typical use-case but it's actually a fairly
frequent thing that happens in integration tests when you don't want to see
stuff
that is tested (well, maybe you do, but only if something fails).

Dawid
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.