You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Joan ventusproxy <jo...@ventusproxy.com> on 2020/08/06 10:33:59 UTC
Date in rotation
Hello,
�
I have the log file named “data”. I will rotate it at midnight, supposing today is 2020-08-06 I want the “data” log file to be renamed to “data.2020-08-06” and a new “data” to log requests from 2020-08-07.
�
I’m going to use ‘CronTriggeringPolicy”. To achieve what I want, should I plan to rotate it at midnight or just after midnight?
�
<CronTriggeringPolicy schedule="0 0 0 * * ?" evaluateOnStartup="true" /> OR
<CronTriggeringPolicy schedule="1 0 0 * * ?" evaluateOnStartup="true" />
�
Thanks,
�
Joan.
Re: Date in rotation
Posted by Ralph Goers <ra...@dslextreme.com>.
You should rotate at midnight.
Ralph
> On Aug 6, 2020, at 3:33 AM, Joan ventusproxy <jo...@ventusproxy.com> wrote:
>
> Hello,
>
> �
>
> I have the log file named “data”. I will rotate it at midnight, supposing today is 2020-08-06 I want the “data” log file to be renamed to “data.2020-08-06” and a new “data” to log requests from 2020-08-07.
>
> �
>
> I’m going to use ‘CronTriggeringPolicy”. To achieve what I want, should I plan to rotate it at midnight or just after midnight?
>
> �
>
> <CronTriggeringPolicy schedule="0 0 0 * * ?" evaluateOnStartup="true" /> OR
>
> <CronTriggeringPolicy schedule="1 0 0 * * ?" evaluateOnStartup="true" />
>
> �
>
> Thanks,
>
> �
>
> Joan.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org