I have a RollingFileAppender that flips through a log file when it reaches a specific file size. This works great.
Is there a way for log4net to insert a header at the beginning of each newly created log file? Alternatively, is there a way to notify log4net on overflow so that I can write this header myself?
I think you may have to extend the application or write your own appender for this.
It works:
<layout type="log4net.Layout.PatternLayout"> <header value="[Header] " /> <conversionPattern value=" ... " /> </layout>
Although it will also write a title if you re-launch the application.