applying resetConfiguration to the LoggerRepository before reconfiguring will resolve this.
dirk On Tuesday 07 February 2006 22:02, DeSantis, MJ Mark @ IS (7179) wrote: > 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 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
