My expectation is that a header is written when the file is first created and 
is empty and the footer is appended when the file is closed before a rollover. 
I suspect the first behavior is implemented but the footer is being written on 
every close. Unfortunately it has to do that to behave correctly since it has 
no way to know if it will ever be written to again. 

To be consistent the header should be written every time the file is opened. 
But that may not be what you want.

Ralph

> On Jun 11, 2019, at 1:44 PM, Paul Benedict <pbened...@apache.org> wrote:
> 
> Good day.
> 
> All my File Appenders have Pattern Layouts that specify both "header" and
> "footer" attributes. I use these (ex: === START and === END) to bookend
> process executions  Executions happen multiple times of day, and I am
> always appending to the logs.
> 
> This isn't working for me. I am experiencing the unexpected:
> 1) The header is *only* written if the file must be created.
> 2) The footer is always written.
> 
> So my log files show one header and tons of footers.
> 
> Can someone please advise?
> 
> Cheers and God bless,
> Paul



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org

Reply via email to