You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "karunakaran (JIRA)" <ji...@apache.org> on 2016/06/15 07:38:09 UTC
[jira] [Commented] (LOG4J2-1426) Log Rotation or rollover on every
server shutdown in log4j2
[ https://issues.apache.org/jira/browse/LOG4J2-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15331304#comment-15331304 ]
karunakaran commented on LOG4J2-1426:
-------------------------------------
I have found temporary solution for this issue. Here is the answer http://stackoverflow.com/a/37828835/1381266
> 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
>
> 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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org