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 Emi <em...@encs.concordia.ca> on 2016/06/13 14:04:13 UTC
About onStartTriggeringPolicy for 2.6.1
Hello,
For 2.6.1, added onStartTriggeringPolicy:
<RollingFile name="debug_html" fileName="@log4j.debug.html@"
filePattern="@log4j.debug.html@-%i.html">
<HTMLLayout charset="UTF-8" title="......" />
<Policies>
<OnStartupTriggeringPolicy />
<SizeBasedTriggeringPolicy size="50 MB" />
</Policies>
</RollingFile>
. Reload/restart tomcat
debug.html is changed to debug-1.html automatically (even
debug.html=10kb)
New debug.html is created
So, it's not possible when debug.html < 50 MB, reload tomcat, info
appended to debug.html anymore?
----
Please add the {{OnStartupTriggeringPolicy}} policy to your configuration.
{quote}
OnStartupTriggeringPolicy was forcing a rollover of empty files at
startup and would append a second footer that was added by the prior
shutdown.
{quote}
-------
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: About onStartTriggeringPolicy for 2.6.1
Posted by Ralph Goers <ra...@dslextreme.com>.
Well, OnStartupTriggeringPolicy is supposed to cause a roll over at startup, so if it wasn’t it was a bug. The only time it does not perform the roll over is if the file size is 0. If you would like a minimum size criteria to be added please create a Jira issue for that.
Ralph
> On Jun 13, 2016, at 7:04 AM, Emi <em...@encs.concordia.ca> wrote:
>
> Hello,
>
> For 2.6.1, added onStartTriggeringPolicy:
>
> <RollingFile name="debug_html" fileName="@log4j.debug.html@"
> filePattern="@log4j.debug.html@-%i.html">
> <HTMLLayout charset="UTF-8" title="......" />
> <Policies>
> <OnStartupTriggeringPolicy />
> <SizeBasedTriggeringPolicy size="50 MB" />
> </Policies>
> </RollingFile>
>
>
> . Reload/restart tomcat
> debug.html is changed to debug-1.html automatically (even debug.html=10kb)
> New debug.html is created
>
>
> So, it's not possible when debug.html < 50 MB, reload tomcat, info appended to debug.html anymore?
>
>
> ----
> Please add the {{OnStartupTriggeringPolicy}} policy to your configuration.
> {quote}
> OnStartupTriggeringPolicy was forcing a rollover of empty files at startup and would append a second footer that was added by the prior shutdown.
> {quote}
> -------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org