You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2003/04/11 20:19:40 UTC
DO NOT REPLY [Bug 18965] New: -
DailyRollingFileAppender leaves file locked causing roll to fail and logging to be discarded!
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18965>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18965
DailyRollingFileAppender leaves file locked causing roll to fail and logging to be discarded!
Summary: DailyRollingFileAppender leaves file locked causing roll
to fail and logging to be discarded!
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Critical
Priority: Other
Component: Configurator
AssignedTo: log4j-dev@jakarta.apache.org
ReportedBy: sdoherty@kc.rr.com
Several people reported the following problem in the log4j user group. I also
encountered. All logging is lost when the roll happens.
"My problem arose when using the DailyRollingFileAppender with Tomcat.
Whenever the webapp reloaded for any reason, the file the Appender was
writing to would apparently not get closed, and I would get the
"log4j:ERROR Failed to rename....." message for every subsequent rollover
attempt." -- Jeffrey Snyder
"When using PropertyConfigurator.configureAndWatch(...), an instance of
org.apache.log4j.helpers.FileWatchdog is instantiated
and started in a separate thread. Redeployment of the application (meaning
removal and deployment) does not remove this thread. So, after redeployment
there are two such threads in the server's VM instance. The second one cannot
access (and therefore not rename) the logfile, because it is locked by the
remaining previous FileWatchDog-thread. Tricky and dangerous: I am constantly
producing dead threads in the server's VM instance." --Urspr�ngliche Nachricht
"I am using log4j within a web application server (SAP Web AS).The logging
itself works fine.
At rolling time, the following message occurs on the server process
console output: log4j:ERROR Failed to rename [./log/Log4JTest.log] to
[./log/Log4JTest.log.2003-01-08-13-11]." -- HaJo Odlozinski
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org