Log4j 2.5 added a CronTriggeringPoilicy that triggers a rollover when the 
specified time pattern matches. You could look at that and create your own 
triggering policy that triggers on whatever your criteria is.  As an 
alternative you can locate the Appender in the configuration, obtain its 
manager and kick off the rollover in your code.

Ralph

> On Dec 21, 2015, at 11:16 AM, John Lussmyer <[email protected]> wrote:
> 
> I have a place in my program where I would like to cause my logger to roll to 
> the next log file.
> Basically, a "TriggerNow" triggering policy.
> Is there any reasonably easy way to do this?
> 
> --
> Tigers prowl and Dragons soar in my dreams...
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to