Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Paul Duffy

Folks,

Been bit by the incremental nature of XML configuration application.  Is 
there any way to not apply a changed XML configuration incrementally, 
but instead force full reset to reflect the state of the configuration file?


Cheers

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Paul Duffy

Thanks Matthew.

We're talking about a JBoss environment using the configureAndWatch type 
of mechanism to pick up the XML configuration changes.


There is no way to fully reset and reload the configuration w/o 
restarting the logging service?



Matthew Kemp wrote:

To reset an entire configuration you need something like this:

public void reloadLog4J() {
LogManager.resetConfiguration();
DOMConfigurator.configure(log4j.xml);
}

Unfortunately, even the DOMConfigurator.configureAndWatch() only does 
an incremental reload.



Matt


On Nov 13, 2007 3:58 PM, Paul Duffy [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Folks,

Been bit by the incremental nature of XML configuration
application.  Is
there any way to not apply a changed XML configuration incrementally,
but instead force full reset to reflect the state of the
configuration file?

Cheers

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Forcing XML configuration file to reset Log4J configuration

2007-11-13 Thread Curt Arnold


On Nov 13, 2007, at 3:58 PM, Paul Duffy wrote:


Folks,

Been bit by the incremental nature of XML configuration  
application.  Is there any way to not apply a changed XML  
configuration incrementally, but instead force full reset to  
reflect the state of the configuration file?


Cheers



log4j 1.2.15 and later support a reset attribute on the  
log4j:configuration element:


log4j:configuration reset=true

See http://issues.apache.org/bugzilla/show_bug.cgi?id=17531


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]