Julian - Yes, its possible.  I have a log file name format of
"debug.2004-04-26.log".  You can set this with the appender in the
config file, although, I don't think how I'm using it is quite what was
envisioned.

Here's my appender:

                <appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
                        <param name="File" value="..\\Data\\Logs\\debug"
/>
                        <param name="AppendToFile" value="true" />
                        <param name="MaxSizeRollBackups" value="10" />
                        <param name="MaximumFileSize" value="100000" />
                        <param name="RollingStyle" value="Composite" />
                        <param name="StaticLogFileName" value="false" />
                        <param name="DatePattern"
value=".yyyy-MM-dd.lo\\g" />
                        <layout type="log4net.Layout.PatternLayout">
                                <param name="Header" value="[BEGIN_LOG
=========================]\r\n" />
                                <param name="Footer" value="[END_LOG
=========================]\r\n\r\n" />
                                <param name="ConversionPattern"
value="%d [%t] %-5p %c [%x] - %m%n" />
                        </layout>
                </appender>

Thanks, Mike Lansdaal

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 29, 2004 2:20 PM
To: [email protected]
Subject: RollingFileAppender File Extension/Date Format


I'm not sure if this is possible with log4net, but I would like to
change RollingFileAppender so the date file suffix is something other
than the '.log' followed by the formatted date. Maybe something like
this:

LoggerFileName.YYYYMMdd.log

- or -

YYYYMMdd.LoggerFileName.log

Thanks...

Reply via email to