Is it possible to include only the header information at the top of the sliding file?
I have the following configuration file:
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender"> <file value="d:\temp\TTTest.log"/> <layout type="log4net.Layout.PatternLayout"> <header value="[Header] " /> <param name="ConversionPattern" value="%-25utcdate{dd/MM/yyyy HH:mm:ss.fff}%-20property{log4net:HostName}%-30logger%-30thread%-7level%message%newline"/> </layout> <lockingModel type="log4net.Appender.FileAppender+MinimalLock"/> <maximumFileSize value="5MB"/> <rollingStyle value="Size"/> <maxSizeRollBackups value="-1"/> <countDirection value="1"/> </appender>
When I run my application, for example, twice, I get the header information twice, for example.
[Header] The Log line [Header] The Log line etc
I want to achieve the following results:
[Header] The Log line The Log line etc
Noel
source share