Friday, May 18, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: RollingFileAppender not working
Prev Next
You are not authorized to post a reply.

Author Messages
vikram srinivasan

07/18/2008 4:18 PM  
Hi All
 
We have an app that uses log4net 1.2.0.22663. Its deployed on Win2K3 server, running on IIS 6.0. My log4net config look like,
 
<log4net debug="false">
  <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
   <param name="File" value="..\\..\\settings\\logs\\WindowsCWSLog.txt"/>
   <param name="AppendToFile" value="true"/>
   <param name="RollingStyle" value="Size"/>
   <param name="MaxSizeRollBackups" value="20"/>
   <!-- max file size for hte log before it rolls over... 10MB -->
   <param name="MaximumFileSize" value="10000KB"/>
   <param name="StaticLogFileName" value="true"/>
   <layout type="log4net.Layout.PatternLayout">
    <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n"/>
   </layout>
  </appender>
  <root>
   <level value="DEBUG"/>
   <appender-ref ref="LogFileAppender"/>
  </root>
 </log4net>    
   
As you can see I have set up a size based rolling over. Recently, this seems to have broken. I turned on internal debugging and got this error,
log4net:ERROR RollingFileAppenderOutput stream for appender named [LogFileAppender] has been closed.
 
Rolling over is no longer happening and logging is off until I manually roll the file over. Also, the count direction (although not set in the config) is less than 0 as I see the last rolled over file having the highest number.
 
Any thoughts?
 
Thanks
Srini
Rennie Petersen

07/18/2008 5:21 PM  
> Any thoughts?
 
This is a wild guess, but could it be related to changed security rights and permissions to the location of the log files relative to the Windows account that the program is running under?
 
Rennie
 
vikram srinivasan

07/18/2008 5:25 PM  
Thanks Rennie. I have tried to give Everyone full control to try debugging this. Didnt help though.


 
On 7/18/08, Rennie Petersen <rp@merlinia.com> wrote:
> Any thoughts?
 
This is a wild guess, but could it be related to changed security rights and permissions to the location of the log files relative to the Windows account that the program is running under?
 
Rennie
 


From: vikram srinivasan [mailto:vikramtheking@googlemail.com]
Sent: 18. juli 2008 16:19
To: log4net-user@logging.apache.org
Subject: RollingFileAppender not working

 
Hi All
 
We have an app that uses log4net 1.2.0.22663. Its deployed on Win2K3 server, running on IIS 6.0. My log4net config look like,
 
<log4net debug="false">
  <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">
   <param name="File" value="..\\..\\settings\\logs\\WindowsCWSLog.txt"/>
   <param name="AppendToFile" value="true"/>
   <param name="RollingStyle" value="Size"/>
   <param name="MaxSizeRollBackups" value="20"/>
   <!-- max file size for hte log before it rolls over... 10MB -->
   <param name="MaximumFileSize" value="10000KB"/>
   <param name="StaticLogFileName" value="true"/>
   <layout type="log4net.Layout.PatternLayout">
    <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - %m%n"/>
   </layout>
  </appender>
  <root>
   <level value="DEBUG"/>
   <appender-ref ref="LogFileAppender"/>
  </root>
 </log4net>    
   
As you can see I have set up a size based rolling over. Recently, this seems to have broken. I turned on internal debugging and got this error,
log4net:ERROR RollingFileAppenderOutput stream for appender named [LogFileAppender] has been closed.
 
Rolling over is no longer happening and logging is off until I manually roll the file over. Also, the count direction (although not set in the config) is less than 0 as I see the last rolled over file having the highest number.
 
Any thoughts?
 
Thanks
Srini



--
Throw rubbish in dust-bins... make the future clean.
You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > RollingFileAppender not working



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement