org.apache.logging.log4j.core.appender.rolling

Class SizeBasedTriggeringPolicy

  • java.lang.Object
    • org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy
    • Field Detail

      • LOGGER

        protected static final Logger LOGGER
        Allow subclasses access to the status logger without creating another instance.
    • Constructor Detail

      • SizeBasedTriggeringPolicy

        protected SizeBasedTriggeringPolicy()
        Constructs a new instance.
      • SizeBasedTriggeringPolicy

        protected SizeBasedTriggeringPolicy(long maxFileSize)
        Constructs a new instance.
        Parameters:
        maxFileSize - rollover threshold size in bytes.
    • Method Detail

      • getMaxFileSize

        public long getMaxFileSize()
      • isTriggeringEvent

        public boolean isTriggeringEvent(LogEvent event)
        Returns true if a rollover should occur.
        Specified by:
        isTriggeringEvent in interface TriggeringPolicy
        Parameters:
        event - A reference to the currently event.
        Returns:
        true if a rollover should take place, false otherwise.

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.