Name
ConsoleHandler
Synopsis
This
Handler subclass
formats LogRecord objects and outputs the
resulting string to the System.err output stream.
When a ConsoleHandler is created, the various
properties inherited from Handler are initialized
using system-wide defaults obtained by querying named values with
LogManager.getProperty( ). The table below lists
these properties, the value passed to getProperty(
), and the default value used if getProperty(
) returns null. See
Handler for further details.
|
Handler property |
LogManager property name |
Default |
|---|---|---|
|
level |
java.util.logging.ConsoleHandler.level |
Level.INFO |
|
filter |
java.util.logging.ConsoleHandler.filter |
null |
|
formatter |
java.util.logging.ConsoleHandler.formatter |
SimpleFormatter |
|
encoding |
java.util.logging.ConsoleHandler.encoding |
platform default |
Figure 16-114. java.util.logging.ConsoleHandler
public class ConsoleHandler extends StreamHandler { // Public Constructors public ConsoleHandler( ); // Public Methods Overriding StreamHandler public void close( ); public void publish(LogRecord record); }
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access