public class TLcdJULFileHandler extends java.util.logging.Handler
Handlerthat logs all messages to a file. This class is similar to the standard
FileHandlerbut it can be used by any number of
TLcdJULFileHandler maintains a list of several log files.
The current (most recent) file has the index 0 while older logs have
corresponding increasing numbers. When the size of the current log file
exceeds a certain limit, the log files are rotated. The total number of log
files is also limited - if the limit is exceeded then the oldest file is
The first time a handler of this type is created, it reads the following properties from the logging configuration file:
Handler. The default is
Filterclass. The default is no filter.
Formatterclass. The default is
false, meaning that the logs are rotated and a new file is created.
A pattern consists of a string that includes the following special components that will be replaced at runtime:
|Constructor and Description|
Creates a new TLcdJULFileHandler with the default settings.
|Modifier and Type||Method and Description|
Closes the stream of the current TLcdJULFileHandler..
Flushes any buffered message.
Writes the given
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel
public void publish(java.util.logging.LogRecord aRecord)
LogRecordto the log. The file is flushed after each log record.
aRecord- the record to write.
public void flush()
public void close() throws java.lang.SecurityException