log4net - Unable to find the specified file (RollingFileAppender)

M

mablao

Hi,
After a long time processing, the log4net fail on writing the log file.
Here it is the error:

Exception Information
System.IO.FileNotFoundException: Unable to find the specified file.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.__Error.WinIOError()
at System.IO.FileInfo.MoveTo(String destFileName)
at log4net.Appender.RollingFileAppender.RollFile(String from, String
to)
at log4net.Appender.RollingFileAppender.RollOverSize()
at log4net.Appender.RollingFileAppender.SubAppend(LoggingEvent
loggingEvent)
at log4net.Appender.TextWriterAppender.Append(LoggingEvent
loggingEvent)
at log4net.Appender.AppenderSkeleton.DoAppend(LoggingEvent
loggingEvent)
at
log4net.helpers.AppenderAttachedImpl.AppendLoopOnAppenders(LoggingEvent
loggingEvent)
at log4net.Category.CallAppenders(LoggingEvent loggingEvent)
at log4net.Category.Log(Priority priority, Object message)
at log4net.Category.Info(Object message)
at
Cit.Projects.Globo.Agra.InfraStructure.Logger.Logger.logInfo(String
message)
....
....

Configurations:
<log4net>
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender,log4net">
<param name="File" value="E:/agra2/log/loggerdecae.log" />
<param name="AppendToFile" value="true" />
<param name="MaxSizeRollBackups" value="20" />
<param name="MaximumFileSize" value="100MB" />
<param name="RollingStyle" value="Size" />
<param name="StaticLogFileName" value="true" />
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern" value="[&lt;%-5p&gt; %d{dd/MM/yyyy
HH:mm:ss:fff}]: %m%n" />
</layout>
</appender>
<root>
<priority value="DEBUG" />
</root>
<category name="Cit.Projects.Globo.Agra">
<appender-ref ref="RollingLogFileAppender" />
</category>
</log4net>

Anyone pass through the same problem ?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top