logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DeSantis, MJ Mark @ IS (7179)" <Mark.J.DeSan...@L-3com.com>
Subject JoranConfigurator configuration of log4j
Date Tue, 07 Feb 2006 21:02:38 GMT
This is more of a "just out of curiousity" type question.
 
When I configure log4j in the code (using the JoranConfigurator) with an xml
file. I get what you would expect - all my appenders and such defined in the
xml file are instanciated. If I decide to reconfigure log4j using the same
xml config file, while log4j is still running, I find something that I
wouldn't really expect - the reconfigure puts duplicates of all the
appenders and such. So if my config file defined a SocketAppender and a
JmsAppender attached to the root logger, and I configure log4j with that
file, when I do a reconfigure with the same file I get two SocketAppenders
and two JmsAppenders on the root logger.
 
I was just wondering if this was intended behaviour. I just ask because I
know the JoranConfigurator is new, and behaviour can obviously change from
alpha to beta to final release.
 
If this is behaviour is intended, then is there a conveinent way of
"unconfiguring" log4j so in memory it is "primed" to be configured by the
same configuration file? (am I making sense? let me know if I'm not).
 
 
Mark

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