Re: How to configure log4j2 to rollover with time stamp on startup? (OR: feature request)

2018-05-15 Thread Hachey, Philip
Thank you. After experimenting a bit with CronTriggeringPolicy and initially unable to get it to work even in the simplest of configurations, I found the precise condition that was preventing rollover from happening: including createOnDemand="true" in the RollingFile element. After excluding

Re: How to configure log4j2 to rollover with time stamp on startup? (OR: feature request)

2018-05-15 Thread Franz Wong
Is it more suitable to use CronTriggeringPolicy? -Franz On Tue, May 15, 2018 at 4:21 AM, Hachey, Philip < philip.hac...@nrc-cnrc.gc.ca> wrote: > Yes. As a test, I set the configuration to rollover every minute. > Running a test application that takes negligible time to run and then > running

Re: How to configure log4j2 to rollover with time stamp on startup? (OR: feature request)

2018-05-14 Thread Hachey, Philip
Yes. As a test, I set the configuration to rollover every minute. Running a test application that takes negligible time to run and then running it again a few minutes later produces no rollover. Log messages from both executions get logged to the same file. Here are the contents of the

Re: How to configure log4j2 to rollover with time stamp on startup? (OR: feature request)

2018-05-14 Thread Matt Sicker
Are you using OnStartupTriggeringPolicy? http://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppender On 14 May 2018 at 12:47, Hachey, Philip wrote: > Hello. This is a question about how to achieve a particular result with > log4j2, but I expect