Just a suggestion, but if this is a development server, and the application is 
already getting re-deployed more than daily, why not experiment with a smaller 
rollover time (daily or hourly)? Just to make sure that DailyRollingAppender 
isn't somehow borked in your combination of OS / app server / application.

-----Original Message-----
From: Marc Farrow [mailto:marc.far...@gmail.com] 
Sent: Monday, May 11, 2009 8:34 AM
To: log4j-user@logging.apache.org
Subject: Re: DailyRollingAppender - How does it know when to rollover?


I checked the log file for my container (Tomcat) and there were no error 
messages that I could see for any rollover messages.  However, I guess I am 
going to have to wait til next month to verify.  Since my container is Tomcat 
and my container gets restarted fairly often (multiple times a day because this 
is a our development server), could this affect the rollover logic?

Thank you,

Marc 



Paul Smith-2 wrote:
> 
> the first logging event _after_ the time period computed should roll 
> the file over, however if there is any failure (perhaps because 
> another process has the file handle open, a common problem on 
> Windows), the rollover can fail, and you'll need to wait to the next 
> window (another month).
> 
> When the failure occurs, it does log to StdErr (from the source code 
> to DailyRollingFileAppender):
> 
>    protected void subAppend(LoggingEvent event) {
>        long n = System.currentTimeMillis();
>        if (n >= nextCheck) {
>            now.setTime(n);
>            nextCheck = rc.getNextCheckMillis(now);
>            try {
>                rollOver();
>            }
>            catch(IOException ioe) {
>                if (ioe instanceof InterruptedIOException) {
>                    Thread.currentThread().interrupt();
>                }
>                LogLog.error("rollOver() failed.", ioe);
>            }
>        }
>        super.subAppend(event);
>    }
> 
> It tries it's best to continue logging until next roll over period.
> 
> Paul
> 
> On 11/05/2009, at 9:31 PM, Marc Farrow wrote:
> 
>>
>> This is a fairly simple question.  Does anyone that maintains or 
>> create LOG4J read these posts anymore?
>>
>> Thanks.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/DailyRollingAppender---How-does-it-know-when-to
>> -rollover--tp23390773p23481523.html
>> Sent from the Log4j - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>
> 
> Paul Smith
> Production Engineering Manager
> 
> Aconex
> The easy way to save time and money on your project
> 
> 696 Bourke Street, Melbourne,
> VIC 3000, Australia
> Tel: +61 3 9240 0200  Fax: +61 3 9240 0299
> Email: psm...@aconex.com  www.aconex.com
> 
> This email and any attachments are intended solely for the addressee.  
> The contents may be privileged, confidential and/or subject to 
> copyright or other applicable law. No confidentiality or privilege is 
> lost by an erroneous transmission. If you have received this e-mail in 
> error, please let us know by reply e-mail and delete or destroy this 
> mail and all copies. If you are not the intended recipient of this 
> message you must not disseminate, copy or take any action in reliance 
> on it. The sender takes no responsibility for the effect of this 
> message upon the recipient's computer system.
> 
> 
> 
> 
> 
> 

--
View this message in context: 
http://www.nabble.com/DailyRollingAppender---How-does-it-know-when-to-rollover--tp23390773p23482416.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


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

Reply via email to