|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.logging.Handler
net.sf.freecol.common.logging.DefaultHandler
public final class DefaultHandler
The default handler for FreeCol's log records. It currently only logs to a file in the format offered by TextFormatter.
Constructor Summary | |
---|---|
DefaultHandler(boolean consoleLogging,
java.lang.String fileName)
The constructor to use. |
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, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultHandler(boolean consoleLogging, java.lang.String fileName) throws FreeColException
consoleLogging
- The flag to log to the console as well.
FreeColException
- In case the log file could not be
created/written to.Method Detail |
---|
public void close()
close
in class java.util.logging.Handler
public void flush()
flush
in class java.util.logging.Handler
public void publish(java.util.logging.LogRecord record)
publish
in class java.util.logging.Handler
record
- The log record to publish.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |