Handler subclass formats
LogRecord objects and outputs the resulting
strings to a file or to a rotating set of files. Arguments passed to
FileHandler( ) constructor specify which file
or files are used, and how they are used. The arguments are optional,
and if they are not specified, defaults are obtained through
LogManager.getProperty( ) as described below. The
constructor arguments are:
A string containing substitution characters that describes one or more files to use. The substitutions performed to convert this pattern to a filename are described below.
An approximate maximum file size for the log file, or 0 for no limit.
count is set to greater than one, then
when a log file reaches this maximum,
closes it, renames it, and then starts a new log with the original
limit is set to be nonzero, this
arguemnt specifies the number of old log files to retain.
true if the
append to log messages already in the named file, or
false if it should overwrite the file.
pattern argument is the most important
of these: it specifies which file or files the
FileHandler will write to.
FileHandler performs the following substitutions
on the specified pattern to convert it to a filename:
The directory separator character for the platform. This means that you can always use a forward slash in your patterns, even on Windows filesystems that use backward slashes.