logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Jerdonek" <jerdo...@granicus.com>
Subject rollingfileappender - repetition of file name suffix
Date Tue, 04 Mar 2008 04:20:31 GMT
Hi,

I've searched around the documentation and on the web but couldn't find
reference to this behavior (though the recent thread called "log4net and
IIS problems" seems indirectly related.) 

I'm using a RollingFileAppender with a MinimalLock and simple date
pattern for the file name.  When I deploy my application, I get several
files of the following form in my log directory (at bottom is the
configuration):

log2008-03.0
log2008-03.02008-03.0
log2008-03.02008-03.02008-03.0

Is this by design?  My understanding was that the MinimalLock permits
writes from multiple processes (though more slowly).

I'm using the appender for an ASP.NET application in an app pool with
more than one instance of the application running, and that undergoes
worker process recycling periodically.

I also understand that this is not the ideal scenario for a
RollingFileAppender, but I'm just looking for something quick and wanted
to understand the behavior above a bit better.

Okay, thanks in advance for your help, and thanks also for your work in
keeping this project going.

--Chris


<appender name="LongTermRolling"
type="log4net.Appender.RollingFileAppender">
<param name="File" value="C:\\temp\\Logs\\MyApp\\LongTerm\\log"/>
<param name="LockingModel" value="MinimalLock"/>
<param name="RollingStyle" value="Composite"/>
<param name="DatePattern" value="yyyy-MM"/>
<param name="MaximumFileSize" value="30MB"/>
<param name="MaxSizeRollBackups" value="6"/>
<param name="StaticLogFileName" value="false"/>
<param name="CountDirection" value="1"/>
<layout type="log4net.Layout.PatternLayout,log4net">
<param name="ConversionPattern"
value="%date,%property{ApplicationName},%property{log4net:HostName},%lev
el,%thread,%logger{1},%property{SourceIp},%property{HttpHost},%property{
UrlPath},%property{QueryString},%property{SoapAction},%property{Code},%m
essage%n"/>
</layout>
</appender>

Mime
View raw message