java.lang.Objectjava.util.logging.Handler
Direct Known Subclasses:
ConsoleHandler, FileHandler, StreamHandler, SocketHandler, MemoryHandler
A Handler can be disabled by doing a setLevel(Level.OFF) and can be re-enabled by doing a setLevel with an appropriate level.
Handler classes typically use LogManager properties to set default values for the Handler's Filter, Formatter, and Level. See the specific documentation for each concrete Handler class.
1.4 - | Field Summary | ||
|---|---|---|
| boolean | sealed | |
| Constructor: |
|---|
|
| Method from java.util.logging.Handler Summary: |
|---|
| checkAccess, close, flush, getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, publish, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel |
| Methods from java.lang.Object: |
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from java.util.logging.Handler Detail: |
|---|
|
The 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. |
|
|
|
|
|
|
This 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. |
The 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. |
|
The encoding should be set before any LogRecords are written to the Handler. |
The ErrorManager's "error" method will be invoked if any errors occur while using this Handler. |
For each call of publish the Handler will call this Filter (if it is non-null) to check if the LogRecord should be published or discarded. |
Some Handlers may not use Formatters, in which case the Formatter will be remembered, but not used. |
The intention is to allow developers to turn on voluminous logging, but to limit the messages that are sent to certain Handlers. |