I have the following layout defined for a RollingFileAppender  (log4Net
1.2.10)

<layout type="log4net.Layout.PatternLayout">
  <param name="Header" type="log4net.Util.PatternString"
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" type="log4net.Util.PatternString" 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>

The idea is to place the current date and time in the header and footer
of each log file as it rolls over.  Instead each header and footer
receives the same date/time.  (The date/time is the date/time the
original file was opened.)

This action is certainly not what was expected, and I do not believe a
useful implementation.

Can someone say that the result is has expected and, if so, please give
some pointers on how to implement a 'current date/time' for the headers
and footers?

Thanks

------------------------------------------------------------------------
----------
Roy Chastain



Reply via email to