Class OnStartupTriggeringPolicy

All Implemented Interfaces:
TriggeringPolicy, LifeCycle, LifeCycle2

@Plugin(name="OnStartupTriggeringPolicy", category="Core", printObject=true) public class OnStartupTriggeringPolicy extends AbstractTriggeringPolicy
Triggers a rollover on every restart, but only if the file size is greater than zero.
  • Method Details

    • initialize

      public void initialize(RollingFileManager manager)
      Provide the RollingFileManager to the policy.
      manager - The RollingFileManager.
    • isTriggeringEvent

      public boolean isTriggeringEvent(LogEvent event)
      Determine if a rollover should be triggered.
      event - A reference to the current event.
      true if the target file's timestamp is older than the JVM start time.
    • toString

      public String toString()
      toString in class Object
    • createPolicy

      @PluginFactory public static OnStartupTriggeringPolicy createPolicy(@PluginAttribute(value="minSize",defaultLong=1L) long minSize)