Class AsyncFileHandler


  • public class AsyncFileHandler
    extends FileHandler
    A FileHandler implementation that uses a queue of log entries.

    Configuration properties are inherited from the FileHandler class. This class does not add its own configuration properties for the logging configuration, but relies on the following system properties instead:

    • org.apache.juli.AsyncOverflowDropType Default value: 1
    • org.apache.juli.AsyncMaxRecordCount Default value: 10000

    See the System Properties page in the configuration reference of Tomcat.

    • Field Detail

      • DEFAULT_OVERFLOW_DROP_TYPE

        public static final int DEFAULT_OVERFLOW_DROP_TYPE
        See Also:
        Constant Field Values
      • OVERFLOW_DROP_TYPE

        public static final int OVERFLOW_DROP_TYPE
      • MAX_RECORDS

        public static final int MAX_RECORDS
      • closed

        protected volatile boolean closed
    • Constructor Detail

      • AsyncFileHandler

        public AsyncFileHandler()
      • AsyncFileHandler

        public AsyncFileHandler​(java.lang.String directory,
                                java.lang.String prefix,
                                java.lang.String suffix)
      • AsyncFileHandler

        public AsyncFileHandler​(java.lang.String directory,
                                java.lang.String prefix,
                                java.lang.String suffix,
                                java.lang.Integer maxDays)
    • Method Detail

      • close

        public void close()
        Description copied from class: FileHandler
        Close the currently open log file (if any).
        Overrides:
        close in class FileHandler
      • open

        public void open()
        Description copied from class: FileHandler
        Open the new log file for the date specified by date.
        Overrides:
        open in class FileHandler
      • publish

        public void publish​(java.util.logging.LogRecord record)
        Description copied from class: FileHandler
        Format and publish a LogRecord.
        Overrides:
        publish in class FileHandler
        Parameters:
        record - description of the log event
      • publishInternal

        protected void publishInternal​(java.util.logging.LogRecord record)