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
AFileHandler
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
Fields Modifier and Type Field Description protected boolean
closed
static int
DEFAULT_MAX_RECORDS
static int
DEFAULT_OVERFLOW_DROP_TYPE
static int
MAX_RECORDS
static int
OVERFLOW_DROP_CURRENT
static int
OVERFLOW_DROP_FIRST
static int
OVERFLOW_DROP_FLUSH
static int
OVERFLOW_DROP_LAST
static int
OVERFLOW_DROP_TYPE
-
Fields inherited from class org.apache.juli.FileHandler
DEFAULT_BUFFER_SIZE, DEFAULT_MAX_DAYS, writerLock
-
-
Constructor Summary
Constructors 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, java.lang.Integer maxDays)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Close the currently open log file (if any).void
open()
Open the new log file for the date specified bydate
.void
publish(java.util.logging.LogRecord record)
Format and publish aLogRecord
.protected void
publishInternal(java.util.logging.LogRecord record)
-
Methods inherited from class org.apache.juli.FileHandler
closeWriter, flush, openWriter
-
-
-
-
Field Detail
-
OVERFLOW_DROP_LAST
public static final int OVERFLOW_DROP_LAST
- See Also:
- Constant Field Values
-
OVERFLOW_DROP_FIRST
public static final int OVERFLOW_DROP_FIRST
- See Also:
- Constant Field Values
-
OVERFLOW_DROP_FLUSH
public static final int OVERFLOW_DROP_FLUSH
- See Also:
- Constant Field Values
-
OVERFLOW_DROP_CURRENT
public static final int OVERFLOW_DROP_CURRENT
- See Also:
- Constant Field Values
-
DEFAULT_OVERFLOW_DROP_TYPE
public static final int DEFAULT_OVERFLOW_DROP_TYPE
- See Also:
- Constant Field Values
-
DEFAULT_MAX_RECORDS
public static final int DEFAULT_MAX_RECORDS
- 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 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
public void publish(java.util.logging.LogRecord record)
Description copied from class:FileHandler
Format and publish aLogRecord
.- Overrides:
publish
in classFileHandler
- Parameters:
record
- description of the log event
-
publishInternal
protected void publishInternal(java.util.logging.LogRecord record)
-
-