logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal ROZE" <pascal.r...@gmail.com>
Subject Re: RollingFileAppender datePattern
Date Mon, 06 Oct 2008 21:58:39 GMT
Hi

I have managed to do that with a custom appender

Pascal

2008/10/6 Bill McCormick <wpmccormick@gmail.com>

> I have a RollingFileAppender defined as:
>
>   <appender name="XMLRollingFile" type="log4net.Appender.
> RollingFileAppender">
>     <threshold value="DEBUG" />
>     <staticLogFileName value="true" />
>     <file value="MyLog.xml" />
>     <appendToFile value="true" />
>     <rollingStyle value="Date" />
>     <datePattern value="yyyyMMdd" />
>     <maxSizeRollBackups value="30" />
>     <maximumFileSize value="20MB" />
>     <layout type="log4net.Layout.XmlLayoutSchemaLog4j">
>       <locationInfo value="true" />
>     </layout>
>   </appender>
>
> Is there a trick to getting the backup files to be named MyLog-yyyyMMdd.xml
> as opposed to MyLog.xmlyyyyMMdd?
>
> Having staticLogFileName == false and log files named MyLog-yyyyMMdd.xml
> would also be cool!!
>
>
> Thanks,
>
> Bill
>
>
>

Mime
View raw message