It looks there is no DynamicPatternLayout type in the log4net assembly.
Can you send me your working copy of it?
Thanks!
> Subject: RE: Header in new file
> Date: Thu, 8 Oct 2009 22:35:27 -0400
> From: Roy <at> roychastain.org
> To: log4net-user <at> logging.apache.org
>
> It is possible. Example below
>
> <appender name="RollingTrace" type="log4net.Appender.RollingFileAppender">
> <param name="File" value="${ALLUSERSPROFILE}\\Trace.txt" />
> <param name="AppendToFile" value="true" />
> <param name="MaxSizeRollBackups" value="4" />
> <param name="MaximumFileSize" value="500000" />
> <param name="RollingStyle" value="Size" />
> <param name="StaticLogFileName" value="true" />
> <param name="Threshold" value="TRACE" />
> <param name="PreserveLogFileNameExtension" value="true" />
> <layout type="log4net.Layout.DynamicPatternLayout">
> <param name="Header" value="%newline**** Trace Opened Local: %date{yyyy-MM-dd HH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} ****%newline" />
> <param name="Footer" value="**** Trace Closed %date{yyyy-MM-dd HH:mm:ss.fff} ****%newline" />
> <param name="ConversionPattern" value="%d{dd HH:mm:ss.fff} [%4t] %P{instance}::%M - %m%n" />
> </layout>
> </appender>
>
> Just FYI, this will not work out of the box. The Header/Footer formatting will work, but the time will not ever change with the release code. I had to update some of the DynamicPatternLayout code to make it re-evaluate the date/time for each file.
>
> I am willing to share the changes, but I have NO IDEA how to use the source control product to create the changes etc.
>
>
>
>
> From: Wilco K [mailto:wilcok36 <at> hotmail.com]
> Sent: Thursday, October 08, 2009 09:13
> To: log4net-user <at> logging.apache.org
> Subject: Header in new file
>
> LS,
>
> Is it possible to log a header message to a new file (using the rollingfileappender)? (not a header before every log entry)
>
> Grz
> ________________________________________
> Deel je favoriete foto's online met Windows Live Photos
Lees je Het Net, KPN/Planet, Ziggo of XS4ALL-mail in
Windows Live Hotmail