logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guðlaugur Stefán Egilsson <...@dimonsoftware.com>
Subject Closed appender issue on configuration reload
Date Wed, 24 Sep 2003 14:12:41 GMT
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I have a minor problem with reloading my log4j configuration.
I am working with an application which is deployed as a web
service within Tomcat. There are other applications deployed
there as well, and all of them need to use a common
RemoteAppender. There can be only one RemoteAppender, since it
binds to a TCP port, which is of course exclusive.

To get that to work required a little bit of code, but 
essentially I used the Servlet approach described in the manual,
and extended it to get the appender and add it to newly created
loggers. This works quite nicely until a reload of the web
service occurs. What happens then is that the Servlet is reloaded,
causing reload of the configuration, with the loggers already
existing 
this time. This prompts the configurator to remove all existing 
appenders from the loggers, which for some reason closes the
appenders 
too. (why is that necessary??). This of course closes the
RemoteAppender,
thereby rendering it useless to all the services using it.

So, my first question is, is there any short way around this? 

And the second question is, is this desirable behaviour? It seems to
me that a reconfiguration should not have adverse side effects, such
as closing appenders which are not reopened automatically...

Regards

Guðlaugur Stefán Egilsson
Dimon Software
http://www.dimonsoftware.com


-----BEGIN PGP SIGNATURE-----
Version: PGP 7.1.1

iQA/AwUBP3GmWEJoRUzTQtNXEQI1UgCgtZCKfi7thc3axGHSpU3c2cjeGt0AoI0E
isBtIiq4KwOyVdB/lKMyH2ei
=4J7O
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message