crontriggeringpolicy vs timebasedtriggeringpolicy for daily rotation of log files #2826
-
timebasedtriggeringpolicy we are seeing some issues with file rotation in some scenarios where too many threads on the host are active and though single application is writing to the log: however not seeing rotation happen in some scenarios so we wnated to use corntriggeringpolicy Internally how is crontriggeringpolicy evalueated, is it for every log entry time is compared against cron expression or just one time for lets say a file tthat need to be rotated at midnight Anyone has evaluated this. appreciate your insight in advance,, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
CronTriggeringPolicy uses the ConfigurationScheduler and schedules an activity at the rollover time. When that occurs it just calls the manager.rollover() method. TimeBasedTriggeringPolicy compares the time in every log event and rolls over when it gets a time greater than the rollover time. |
Beta Was this translation helpful? Give feedback.
-
@rgoers TY for quick response one other issue i faced during conversion is unable to provide pattern expression as a suffix to active log file example in below config:
is there a way to provide pattern for acrive log file name : i.e. fileName to have a pattern like TestLog-%d{yyyy-MM-dd}.log rather then just TestLog.log |
Beta Was this translation helpful? Give feedback.
CronTriggeringPolicy uses the ConfigurationScheduler and schedules an activity at the rollover time. When that occurs it just calls the manager.rollover() method. TimeBasedTriggeringPolicy compares the time in every log event and rolls over when it gets a time greater than the rollover time.