Class TimeBasedTriggeringPolicy

All Implemented Interfaces:
TriggeringPolicy, LifeCycle, LifeCycle2

@Plugin(name="TimeBasedTriggeringPolicy", category="Core", printObject=true) public final class TimeBasedTriggeringPolicy extends AbstractTriggeringPolicy
Rolls a file over based on time.
  • Method Details

    • getInterval

      public int getInterval()
    • getNextRolloverMillis

      public long getNextRolloverMillis()
    • initialize

      public void initialize(RollingFileManager aManager)
      Initializes the policy.
      Parameters:
      aManager - The RollingFileManager.
    • isTriggeringEvent

      public boolean isTriggeringEvent(LogEvent event)
      Determines whether a rollover should occur.
      Parameters:
      event - A reference to the currently event.
      Returns:
      true if a rollover should occur.
    • createPolicy

      @Deprecated public static TimeBasedTriggeringPolicy createPolicy(@PluginAttribute("interval") String interval, @PluginAttribute("modulate") String modulate)
      Deprecated.
      Creates a TimeBasedTriggeringPolicy.
      Parameters:
      interval - The interval between rollovers.
      modulate - If true the time will be rounded to occur on a boundary aligned with the increment.
      Returns:
      a TimeBasedTriggeringPolicy.
    • newBuilder

    • toString

      public String toString()
      Overrides:
      toString in class Object