Class AsyncFileHandler
java.lang.Object
java.util.logging.Handler
org.apache.juli.FileHandler
org.apache.juli.AsyncFileHandler
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.juli.FileHandler
FileHandler.ThreadFactory
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from class org.apache.juli.FileHandler
DEFAULT_BUFFER_SIZE, DEFAULT_MAX_DAYS, writerLock
-
Constructor Summary
ConstructorDescriptionAsyncFileHandler
(String directory, String prefix, String suffix) AsyncFileHandler
(String directory, String prefix, String suffix, Integer maxDays) -
Method Summary
Methods inherited from class org.apache.juli.FileHandler
closeWriter, flush, openWriter
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
-
Field Details
-
OVERFLOW_DROP_LAST
public static final int OVERFLOW_DROP_LAST- See Also:
-
OVERFLOW_DROP_FIRST
public static final int OVERFLOW_DROP_FIRST- See Also:
-
OVERFLOW_DROP_FLUSH
public static final int OVERFLOW_DROP_FLUSH- See Also:
-
OVERFLOW_DROP_CURRENT
public static final int OVERFLOW_DROP_CURRENT- See Also:
-
DEFAULT_OVERFLOW_DROP_TYPE
public static final int DEFAULT_OVERFLOW_DROP_TYPE- See Also:
-
DEFAULT_MAX_RECORDS
public static final int DEFAULT_MAX_RECORDS- See Also:
-
OVERFLOW_DROP_TYPE
public static final int OVERFLOW_DROP_TYPE -
MAX_RECORDS
public static final int MAX_RECORDS -
closed
protected volatile boolean closed
-
-
Constructor Details
-
AsyncFileHandler
public AsyncFileHandler() -
AsyncFileHandler
-
AsyncFileHandler
-
-
Method Details
-
close
public void close()Description copied from class:FileHandler
Close the currently open log file (if any).- Overrides:
close
in classFileHandler
-
open
public void open()Description copied from class:FileHandler
Open the new log file for the date specified bydate
.- Overrides:
open
in classFileHandler
-
publish
Description copied from class:FileHandler
Format and publish aLogRecord
.- Overrides:
publish
in classFileHandler
- Parameters:
record
- description of the log event
-
publishInternal
-