logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R Mariotti (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4NET-427) Missing RollingFileAppender log events
Date Sat, 01 Mar 2014 05:53:19 GMT
R Mariotti created LOG4NET-427:

             Summary: 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

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
FileInfo logConfig = new System.IO.FileInfo( logConfigFilePath_ );
log4net.Config.DOMConfigurator.Configure( logConfig );

// My log4net.config file:

        <level value="INFO" />
        <appender-ref ref="RollingFileAppender" />
        <appender-ref ref="ASPNetTraceAppender" />
        <appender-ref ref="TraceAppender" />

    <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" />

This message was sent by Atlassian JIRA

View raw message