logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject RE: Dynamic Configuration
Date Fri, 12 Dec 2003 16:24:54 GMT

The following excerpt from "The complete log4j manual" should help
you understand the observed behavior.

Reloading configuration files:

Reloading of a configuration file or reconfiguration of log4j from a
different con-figuration file is allowed. It is also
thread-safe. Contrary to expected behavior, dur-ing reconfiguration,
log4j configurators do not reset the existing configuration. The
rationale behind this somewhat unexpected behavior is to allow
incremental changes to the configuration.

Reconfiguration has obviously some effect on the existing
configuration. In particular, all appenders of any logger explicitly
mentioned in the new configuration will be closed and removed from the
logger. However, loggers which are not mentioned in the new
configuration remain untouched.  All the more, appenders attached to
such loggers remain attached after reconfiguration.  For example, if
an appender is attached to multiple loggers, it is possible for the
appender to be closed during the reconfiguration but remain attached
to a logger not mentioned in the second configuration file. If after
reconfiguration you try to log to this closed appender, log4j will
warn you about trying to log to a closed appender.

At 11:26 AM 12/12/2003 +1100, you wrote:
> > Problem 2:
> > You mentioned that you get those messages as well sometimes, do you 
> know why?
>It is possible that there might be some synchronization problem at the
>point of the call to a specific appender's close() method, and during
>the close, some logs try and come through to be appended.
>What type of Appender are you using (FileAppender? Daily*Appender?), and
>what version of log4j are you using? (the latest is log4j 1.2.8)
>Paul Smith

Ceki Gülcü

      For log4j documentation consider "The complete log4j manual"
      ISBN: 2970036908 http://www.qos.ch/shop/products/clm_t.jsp  

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

View raw message