logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Her...@zdf.de
Subject Changing log4j config on the fly with 'configureAndWatch()'
Date Thu, 07 Jun 2001 15:49:19 GMT

i'm using log4j 1.1.2 with the following code in my servlet:

String prefix = getServletContext().getRealPath("/");
String file = prefix +
DOMConfigurator.configureAndWatch(file, 10000);

I started Tomcat 3.2.1 with the option -Dlog4j.debug so i can see when log4j
reloads the file.
At runtime i added new categories, with lower priority levels(INFO, DEBUG)
in the file.
Log4j automatically updates the configuration so that i could see more
This works all very fine.

Then i deleted this entries because i wanted to see less informations.
The next time when logging informations should be displayed i got the
following message:

log4j:ERROR Attempted to append to closed appender named [CMD].
log4j:WARN Not allowed to write to a closed appender.

The not deleted categories can still display their informations.

What i've to do that log4j does not longer try to display these now unwanted


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

View raw message