Class SizeBasedTriggeringPolicy<E>

  • All Implemented Interfaces:
    TriggeringPolicy<E>, ContextAware, LifeCycle

    public class SizeBasedTriggeringPolicy<E>
    extends TriggeringPolicyBase<E>
    SizeBasedTriggeringPolicy looks at size of the file being currently written to. If it grows bigger than the specified size, the FileAppender using the SizeBasedTriggeringPolicy rolls the file and creates a new one. For more information about this policy, please refer to the online manual at
    • Constructor Detail

      • SizeBasedTriggeringPolicy

        public SizeBasedTriggeringPolicy()
    • Method Detail

      • isTriggeringEvent

        public boolean isTriggeringEvent​(File activeFile,
                                         E event)
        Description copied from interface: TriggeringPolicy
        Should roll-over be triggered at this time?
        activeFile - A reference to the currently active log file.
        event - A reference to the currently event.
        true if a roll-over should occur.
      • setMaxFileSize

        public void setMaxFileSize​(FileSize aMaxFileSize)