java.lang.Object | |
↳ | java.util.logging.Handler |
Known Direct Subclasses |
Known Indirect Subclasses |
A Handler
object accepts a logging request and exports the desired
messages to a target, for example, a file, the console, etc. It can be
disabled by setting its logging level to Level.OFF
.
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a
Handler object with a default error manager instance
ErrorManager , the default encoding, and the default logging
level Level.ALL . |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes this handler.
| |||||||||||
Flushes any buffered output.
| |||||||||||
Gets the character encoding used by this handler,
null for
default encoding. | |||||||||||
Gets the error manager used by this handler to report errors during
logging.
| |||||||||||
Gets the filter used by this handler.
| |||||||||||
Gets the formatter used by this handler to format the logging messages.
| |||||||||||
Gets the logging level of this handler, records with levels lower than
this value will be dropped.
| |||||||||||
Determines whether the supplied log record needs to be logged.
| |||||||||||
Accepts a logging request and sends it to the the target.
| |||||||||||
Sets the character encoding used by this handler,
null indicates
a default encoding. | |||||||||||
Sets the error manager for this handler.
| |||||||||||
Sets the filter to be used by this handler.
| |||||||||||
Sets the formatter to be used by this handler.
| |||||||||||
Sets the logging level of the messages logged by this handler, levels
lower than this value will be dropped.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Reports an error to the error manager associated with this handler,
ErrorManager is used for that purpose. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Constructs a Handler
object with a default error manager instance
ErrorManager
, the default encoding, and the default logging
level Level.ALL
. It has no filter and no formatter.
Closes this handler. A flush operation will be performed and all the associated resources will be freed. Client applications should not use this handler after closing it.
Gets the character encoding used by this handler, null
for
default encoding.
Gets the error manager used by this handler to report errors during logging.
Gets the filter used by this handler.
null
).
Gets the formatter used by this handler to format the logging messages.
null
).
Gets the logging level of this handler, records with levels lower than this value will be dropped.
Determines whether the supplied log record needs to be logged. The logging levels will be checked as well as the filter.
record | the log record to be checked. |
---|
true
if the supplied log record needs to be logged,
otherwise false
.
Accepts a logging request and sends it to the the target.
record | the log record to be logged; null records are ignored.
|
---|
Sets the character encoding used by this handler, null
indicates
a default encoding.
UnsupportedEncodingException | if charsetName is not supported.
|
---|
Sets the error manager for this handler.
newErrorManager | the error manager to set. |
---|
NullPointerException | if em is null .
|
---|
Sets the filter to be used by this handler.
newFilter | the filter to set, may be null .
|
---|
Sets the formatter to be used by this handler.
newFormatter | the formatter to set. |
---|
NullPointerException | if newFormatter is null .
|
---|
Sets the logging level of the messages logged by this handler, levels lower than this value will be dropped.
newLevel | the logging level to set. |
---|
NullPointerException | if newLevel is null .
|
---|
Reports an error to the error manager associated with this handler,
ErrorManager
is used for that purpose. No security checks are
done, therefore this is compatible with environments where the caller
is non-privileged.
msg | the error message, may be null . |
---|---|
ex | the associated exception, may be null . |
code | an ErrorManager error code.
|