[ 
https://issues.apache.org/jira/browse/LOG4J2-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Davids updated LOG4J2-1228:
---------------------------------
    Attachment: LOG4J2-1228-test.diff

Provided a test which shows the header/footer is printed twice on context 
restart with append=true on rollover.

> Multiple footers written to file on system restart
> --------------------------------------------------
>
>                 Key: LOG4J2-1228
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1228
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Layouts
>            Reporter: Steve Davids
>         Attachments: LOG4J2-1228-test.diff
>
>
> I created a custom layout that appends a header and footer to a rolling file 
> appender with a time based and startup trigger policies which works great 
> during normal circumstances except when it comes to system restarts. On 
> shutdown the file is closed with the footer being written to the file, then 
> on startup the startup trigger policy will open the file then immediately 
> roll thus printing the footer again on rollover (prior to v2.4 the header was 
> also written on startup LOG4J2-1030). I am attempting to produce well-formed 
> XML with this particular use-case but it is getting mangled at this 
> particular point. Ideally we can either have the footer either not print the 
> second time or just perform the rollover on shutdown.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to