Re: rollingfileappender - repetition of file name suffix

2008-03-04 Thread Ron Grabowski
Having a log file named:

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

is not by design. Using multiple processes, MinimalLocks, and 
RollingFileAppender is probably not going to work out well for you. There's no 
way for the RollingFileAppender instances in each process to communicate who 
should initiate the rolling. I'd suggest using a database. You might have 
better luck using the MutextLock class that was posted to the list a couple 
weeks ago. That's a more effecient way of allowing multiple processes to write 
to the same file without having to always open and close the file each message.

- Original Message 
From: Chris Jerdonek [EMAIL PROTECTED]
To: log4net-user@logging.apache.org
Sent: Monday, March 3, 2008 11:20:31 PM
Subject: rollingfileappender - repetition of file name suffix

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





rollingfileappender - repetition of file name suffix

2008-03-03 Thread Chris Jerdonek
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=-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