Handler publishes log records to System.err.
By default the SimpleFormatter is used to generate brief summaries.
Configuration:
By default each ConsoleHandler is initialized using the following
LogManager configuration properties where <handler-name>
refers to the fully-qualified class name of the handler.
If properties are not defined
(or have invalid values) then the specified default values are used.
Handler
(defaults to Level.INFO). Filter class to use
(defaults to no Filter). Formatter class to use
(defaults to java.util.logging.SimpleFormatter).
For example, the properties for ConsoleHandler would be:
For a custom handler, e.g. com.foo.MyHandler, the properties would be:
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | close()
Overrides java. Override |
| public void | publish(LogRecord
description of the log event. A null record is
silently ignored and is not published record)Overrides java. Publish a |
| ConsoleHandler | back to summary |
|---|---|
| public ConsoleHandler() Create a
The | |
| close | back to summary |
|---|---|
| public void close() Overrides java. Override
| |
| publish | back to summary |
|---|---|
| public void publish(LogRecord record) Overrides java. Publish a
The logging request was made initially to a Implementation Specification This method is not synchronized, and subclasses must not define
overridden | |