public class WriterHandler extends Handler
| Constructor and Description |
|---|
WriterHandler(Writer inWriter) |
WriterHandler(Writer inWriter,
Formatter formatter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the Handler and free all associated resources.
|
void |
flush()
Flush any buffered output.
|
boolean |
isLoggable(LogRecord record)
Check if this Handler would actually log a given LogRecord.
|
void |
publish(LogRecord record)
Publish a LogRecord.
|
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevelpublic WriterHandler(Writer inWriter)
public void publish(LogRecord record)
java.util.logging.HandlerThe logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
The Handler is responsible for formatting the message, when and if necessary. The formatting should include localization.
public boolean isLoggable(LogRecord record)
java.util.logging.HandlerThis method checks if the LogRecord has an appropriate Level and whether it satisfies any Filter. It also may make other Handler specific checks that might prevent a handler from logging the LogRecord. It will return false if the LogRecord is null.
isLoggable in class Handlerrecord - a LogRecordpublic void flush()
java.util.logging.Handlerpublic void close()
throws SecurityException
java.util.logging.HandlerThe close method will perform a flush and then close the Handler. After close has been called this Handler should no longer be used. Method calls may either be silently ignored or may throw runtime exceptions.
close in class HandlerSecurityException - if a security manager exists and if
the caller does not have LoggingPermission("control").Copyright © 2019 PostgreSQL Global Development Group. All rights reserved.