logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: DailyRollingFileAppender, but no new file the next day - why?
Date Tue, 12 May 2009 13:00:56 GMT

On May 12, 2009, at 12:31 AM, Linnemann, Gerrit wrote:

> Hallo,
> I'm using the DailyRollingFileAppender. The Tomcat runs 24/7. But  
> I've to restart Tomcat to get a new log file. It seams that log4j  
> only log until midnight. So I lost information.
> Here is my configuration:
>  <appender name="oneFilePerDay"  
> class="org.apache.log4j.DailyRollingFileAppender">
>    <param name="datePattern" value="'.'yyyy-MM-dd" />
>    <param name="file" value="logs/portal.log" />
>    <param name="Append" value="true" />
>    <layout class="org.apache.log4j.PatternLayout">
>      <param name="ConversionPattern" value="%d{ISO8601} %-5p %c{1}: 
> %L - %m%n" />
>    </layout>
>  </appender>
> After restarting the server it works fine, but when I came to work  
> in the morning no new log file is started and there're no new log  
> entries since the last day.
> What can I do?
> Thanking you in anticipation,
> Gerrit

I'm not sure if it would fix your issue, but the  
org.apache.log4j.rolling.RollingFileAppender in the extras companion  
(which can replace DRFA) avoids several (but not all) of the scenarios  
that would cause org.apache.log4j.DRFA problems.

Knowing Platform (Windows, Linux, etc) would be helpful.  Are there  
any file scanners or indexers that might lock the file, have you tried  

<log4j:configuration debug="true">

to see if there were any diagnostic issued.

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

View raw message