net.sf.freecol.common.logging
Class DefaultHandler
java.lang.Object
java.util.logging.Handler
net.sf.freecol.common.logging.DefaultHandler
public final class DefaultHandler
- extends java.util.logging.Handler
The default handler for FreeCol's log records. It currently only logs to a
file in the format offered by TextFormatter.
|
Method Summary |
void |
close()
Closes this handler so that it will stop handling log records. |
void |
flush()
Flushes the data that this handler has logged. |
void |
publish(java.util.logging.LogRecord record)
Publishes the given LogRecord by writing its data to a file using a
TextFormatter. |
| Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- See Also:
- Constant Field Values
LICENSE
public static final java.lang.String LICENSE
- See Also:
- Constant Field Values
REVISION
public static final java.lang.String REVISION
- See Also:
- Constant Field Values
DefaultHandler
public DefaultHandler()
throws FreeColException
- The constructor to use.
- Throws:
FreeColException - In case the log file could not be
created/written to.
close
public void close()
- Closes this handler so that it will stop handling log records.
- Specified by:
close in class java.util.logging.Handler
flush
public void flush()
- Flushes the data that this handler has logged.
- Specified by:
flush in class java.util.logging.Handler
publish
public void publish(java.util.logging.LogRecord record)
- Publishes the given LogRecord by writing its data to a file using a
TextFormatter.
- Specified by:
publish in class java.util.logging.Handler
- Parameters:
record - The log record to publish.