You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by "Dominik Psenner (JIRA)" <ji...@apache.org> on 2015/02/19 09:02:12 UTC

[jira] [Comment Edited] (LOG4NET-82) RollingFileAppender: Cannot RollFile ... Source does not exist

    [ https://issues.apache.org/jira/browse/LOG4NET-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14327091#comment-14327091 ] 

Dominik Psenner edited comment on LOG4NET-82 at 2/19/15 8:01 AM:
-----------------------------------------------------------------

This is a fairly old topic and let me first of all note that the rolling file appender is on the top of the classes to be rewritten from scratch. Therefore there is the link to issue LOG4NET-367. Did you encounter "source does not exist" warnings with your bad file permissions too?


was (Author: nachbarslumpi):
This is a fairly old topic and let me first of all note that the rolling file appender is on the top of the classes to be rewritten from scratch. Did you encounter "source does not exist" warnings with your bad file permissions too?

> RollingFileAppender: Cannot RollFile ... Source does not  exist
> ---------------------------------------------------------------
>
>                 Key: LOG4NET-82
>                 URL: https://issues.apache.org/jira/browse/LOG4NET-82
>             Project: Log4net
>          Issue Type: Bug
>          Components: Appenders
>    Affects Versions: 1.2.9, 1.2.10
>         Environment: Windows 2003 Server
>            Reporter: Kenneth Oberleitner
>             Fix For: 1.2 Maintenance Release
>
>
> The following logging configuration will produce an endless loop of warnings under the following circumstances:
> 	<appender name="AppRollingFileAppender" type="log4net.Appender.RollingFileAppender">
> 		<param name="Threshold" value="ALL"/>
> 		<param name="File" value="Log\\Audit\\audit.txt" />
> 		<param name="AppendToFile" value="true" />
> 		<param name="MaxSizeRollBackups" value="-1" />
> 		<param name="RollingStyle" value="Date" />
> 		<param name="StaticLogFileName" value="true" />
> 		<param name="CountDirection" value="1" />
> 		<param name="DatePattern" value=".yyyyMMdd" />
> 		<layout type="log4net.Layout.PatternLayout">
> 			<param name="ConversionPattern" value="%date [%c(%property{log4net:HostName})-&lt;%ndc&gt;] - %message%newline" />
> 		</layout>
> 	</appender>
> 1.)     set your system clock back at least three days
> 2.)     run an application to create the static log file dated 3 days prior
> 3.)     set your system clock forward a day (i.e. from Monday to Tuesday)
> 4.)     run the application again, the log file will roll and a new static log file is written
> 5.)     set your system clock forward a day (i.e. from Monday to Tuesday)
> 6.)     run the application
> repeated warnings will be issued until the application is killed
> log4net:WARN RollingFileAppender: Cannot RollFile [E:\tmp\LoggingFileLockBug\LoggingFileLockBug\bin\Debug\Log\Audit\audit.txt.XXX] -> [E:\tmp\LoggingFileLockBug\LoggingFileLockBug\bin\Debug\Log\Audit\audit.txt.20060719.XXX]. Source does not exist
> where XXX is infinitely incremented until the process is halted
> Two workarounds found so far both involve changing the date pattern. Both "yyyyMMdd" and ".yyyy-MM-dd" seem to work without issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)