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

Ralph Goers closed LOG4J2-1426.
-------------------------------
    Resolution: Fixed

I am closing this since you have found a workaround. But I should note that 
logs may still be written to the "new" file before shutdown is completed. There 
is no way to prevent that without guaranteeing that everything besides Log4j 
has terminated.

> Log Rotation or rollover on every server shutdown in log4j2
> -----------------------------------------------------------
>
>                 Key: LOG4J2-1426
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1426
>             Project: Log4j 2
>          Issue Type: New Feature
>            Reporter: karunakaran
>            Assignee: Ralph Goers
>            Priority: Major
>
> My requirement is log4j2 should rotate log files when the server shutdown. 
> This option is currently not available in Rotating policy. 
> Currently I am using the following policies:-
> <Policies>
>   <SizeBasedTriggeringPolicy size="2000 MB" />
>   <TimeBasedTriggeringPolicy />
> </Policies>
> Besides, I want to have log files should be rotated with server gets shutdown.
> I have used "OnStartupTriggeringPolicy". But when I use it, log files are 
> rotating after server stop. But I need log files should be rotated when 
> server shutdown.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to