Package org.apache.juli
Class AsyncFileHandler
- java.lang.Object
- 
- java.util.logging.Handler
- 
- org.apache.juli.FileHandler
- 
- org.apache.juli.AsyncFileHandler
 
 
 
- 
 public class AsyncFileHandler extends FileHandler AFileHandlerimplementation that uses a queue of log entries.Configuration properties are inherited from the FileHandlerclass. This class does not add its own configuration properties for the logging configuration, but relies on the following system properties instead:- org.apache.juli.AsyncOverflowDropTypeDefault value:- 1
- org.apache.juli.AsyncMaxRecordCountDefault value:- 10000
 See the System Properties page in the configuration reference of Tomcat. 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.apache.juli.FileHandlerFileHandler.ThreadFactory
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected booleanclosedstatic intDEFAULT_MAX_RECORDSstatic intDEFAULT_OVERFLOW_DROP_TYPEstatic intMAX_RECORDSstatic intOVERFLOW_DROP_CURRENTstatic intOVERFLOW_DROP_FIRSTstatic intOVERFLOW_DROP_FLUSHstatic intOVERFLOW_DROP_LASTstatic intOVERFLOW_DROP_TYPE- 
Fields inherited from class org.apache.juli.FileHandlerDEFAULT_MAX_DAYS, writerLock
 
- 
 - 
Constructor SummaryConstructors Constructor Description AsyncFileHandler()AsyncFileHandler(java.lang.String directory, java.lang.String prefix, java.lang.String suffix)AsyncFileHandler(java.lang.String directory, java.lang.String prefix, java.lang.String suffix, int maxDays)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the currently open log file (if any).protected voidopen()Open the new log file for the date specified bydate.voidpublish(java.util.logging.LogRecord record)Format and publish aLogRecord.protected voidpublishInternal(java.util.logging.LogRecord record)- 
Methods inherited from class org.apache.juli.FileHandlercloseWriter, flush, openWriter
 
- 
 
- 
- 
- 
Field Detail- 
OVERFLOW_DROP_LASTpublic static final int OVERFLOW_DROP_LAST - See Also:
- Constant Field Values
 
 - 
OVERFLOW_DROP_FIRSTpublic static final int OVERFLOW_DROP_FIRST - See Also:
- Constant Field Values
 
 - 
OVERFLOW_DROP_FLUSHpublic static final int OVERFLOW_DROP_FLUSH - See Also:
- Constant Field Values
 
 - 
OVERFLOW_DROP_CURRENTpublic static final int OVERFLOW_DROP_CURRENT - See Also:
- Constant Field Values
 
 - 
DEFAULT_OVERFLOW_DROP_TYPEpublic static final int DEFAULT_OVERFLOW_DROP_TYPE - See Also:
- Constant Field Values
 
 - 
DEFAULT_MAX_RECORDSpublic static final int DEFAULT_MAX_RECORDS - See Also:
- Constant Field Values
 
 - 
OVERFLOW_DROP_TYPEpublic static final int OVERFLOW_DROP_TYPE 
 - 
MAX_RECORDSpublic static final int MAX_RECORDS 
 - 
closedprotected volatile boolean closed 
 
- 
 - 
Constructor Detail- 
AsyncFileHandlerpublic AsyncFileHandler() 
 - 
AsyncFileHandlerpublic AsyncFileHandler(java.lang.String directory, java.lang.String prefix, java.lang.String suffix)
 - 
AsyncFileHandlerpublic AsyncFileHandler(java.lang.String directory, java.lang.String prefix, java.lang.String suffix, int maxDays)
 
- 
 - 
Method Detail- 
closepublic void close() Description copied from class:FileHandlerClose the currently open log file (if any).- Overrides:
- closein class- FileHandler
 
 - 
openprotected void open() Description copied from class:FileHandlerOpen the new log file for the date specified bydate.- Overrides:
- openin class- FileHandler
 
 - 
publishpublic void publish(java.util.logging.LogRecord record) Description copied from class:FileHandlerFormat and publish aLogRecord.- Overrides:
- publishin class- FileHandler
- Parameters:
- record- description of the log event
 
 - 
publishInternalprotected void publishInternal(java.util.logging.LogRecord record) 
 
- 
 
-