[ https://issues.apache.org/jira/browse/LOG4NET-427?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13918790#comment-13918790 ]
R Mariotti commented on LOG4NET-427: ------------------------------------ Thanks, Dominik. I posted a summary of this issue to https://issues.apache.org/jira/browse/LOG4NET-255 In case you know the immediate answer, how to avoid Locking? Even w/ it's own Application Pool and updating to the latest log4net DLL, I see entries for: 2014-03-03 16:12:56:0644 2852 log4net:ERROR [RollingFileAppender] ErrorCode: GenericFailure. Unable to acquire lock on file C:\inetpub\wwwroot\MyApplication\logs\SomeLog.log. The process cannot access the file 'C:\inetpub\wwwroot\MyApplication\logs\SomeLog.log' because it is being used by another process. Thanks again; Feel free to close this 'issue' if it should be part of the user board. Ryan > Missing RollingFileAppender log events > -------------------------------------- > > Key: LOG4NET-427 > URL: https://issues.apache.org/jira/browse/LOG4NET-427 > Project: Log4net > Issue Type: Bug > Components: Other > Environment: IIS on Win 2008, .NET 4.0 > Reporter: R Mariotti > Priority: Minor > > This is my first time using this Jira system so apologies if this post > belongs elsewhere: > I have been using log4net for many years but more recently have been using it > for some more critical logging. I'm noticing that my RollingLogAppender > fails to log certain events. It appears to be random but it's as if the .log > file loses "connection" with IIS periodically and stops writing. > Particularly on log files that write a single line every few minutes or so. > Can you point me in the right direction for ways to bulletproof my > RollingFileAppender so that it logs all the time? > // Here's how I initialize the logger > // log4net 1.2.0.30714 > FileInfo logConfig = new System.IO.FileInfo( logConfigFilePath_ ); > log4net.Config.DOMConfigurator.Configure( logConfig ); > // My log4net.config file: > <log4net> > <root> > <level value="INFO" /> > <appender-ref ref="RollingFileAppender" /> > <appender-ref ref="ASPNetTraceAppender" /> > <appender-ref ref="TraceAppender" /> > </root> > <appender name="RollingFileAppender" > type="log4net.Appender.RollingFileAppender"> > <param name="File" value="logs\\MyLogName.log" /> > <param name="AppendToFile" value="true" /> > <param name="RollingStyle" value="Size" /> > <param name="MaxSizeRollBackups" value="200" /> > <param name="MaximumFileSize" value="1000KB" /> > <param name="StaticLogFileName" value="true" /> > <layout type="log4net.Layout.PatternLayout"> > <param name="ConversionPattern" value="%d [%t] %-5p %c [%x] - > %m%n" /> > </layout> > </appender> > </log4net> -- This message was sent by Atlassian JIRA (v6.2#6252)