logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dominik Psenner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4NET-427) Missing RollingFileAppender log events
Date Mon, 03 Mar 2014 07:33:20 GMT

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

Dominik Psenner commented on LOG4NET-427:
-----------------------------------------

Your configuration looks ok and should work fine. However, we've seen some trouble with appdomain
recycles. Would you please check if any of those is a duplicate to your issue?

https://issues.apache.org/jira/browse/LOG4NET-381?jql=project%20%3D%20LOG4NET%20AND%20text%20~%20IIS

It might also be a good idea to ask this question on the users list. There you will receive
much more feedback as much more people read that list than the bug tracker issues.

> 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)

Mime
View raw message