You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Joe Joe <jo...@hotmail.com> on 2007/05/04 21:23:23 UTC

RollingFileAppender: Date/Time based rolling doesn't work

Log4Net 1.2.10.

In an ASP.NET web application I've configured a RollingFileAppender to roll 
every day.  It works fine on my development server.

On the production server, I never see a rolled file - instead it always 
appends to the configured log file.

The main difference I can see is that the ASP.NET application is restarted 
every night on the production server.  Access to the application and 
therefore logging usually only occurs during working hours.

I would have expected Log4Net to roll the file the first time it attempts to 
write to it if the file last write time is in an old date period.  But this 
doesn't seem to be the case.

Is there any way to workaround this behaviour?

Thanks.

_________________________________________________________________
Txt a lot? Get Messenger FREE on your mobile.  
https://livemessenger.mobile.uk.msn.com/


RE: RollingFileAppender: Date/Time based rolling doesn't work

Posted by Dean Fiala <df...@celadonlabs.com>.
This sounds like a permissions issue.  

Does the ASPNET user have modify permissions for the directory that holds
the logs?

Regards,

Dean Fiala

Chief Technology Officer
Celadon Laboratories, Inc.
http://www.celadonlabs.com


-----Original Message-----
From: Joe Joe [mailto:jocularjoe@hotmail.com] 
Sent: Friday, May 04, 2007 3:23 PM
To: log4net-user@logging.apache.org
Subject: RollingFileAppender: Date/Time based rolling doesn't work

Log4Net 1.2.10.

In an ASP.NET web application I've configured a RollingFileAppender to roll
every day.  It works fine on my development server.

On the production server, I never see a rolled file - instead it always
appends to the configured log file.

The main difference I can see is that the ASP.NET application is restarted
every night on the production server.  Access to the application and
therefore logging usually only occurs during working hours.

I would have expected Log4Net to roll the file the first time it attempts to
write to it if the file last write time is in an old date period.  But this
doesn't seem to be the case.

Is there any way to workaround this behaviour?

Thanks.

_________________________________________________________________
Txt a lot? Get Messenger FREE on your mobile.  
https://livemessenger.mobile.uk.msn.com/