public class ConsoleHandler extends StreamHandler
System.err.
This handler reads the following properties from the log manager to initialize itself:
Level.INFO if this property is not found or has an
invalid value.
null if this
property is not found or has an invalid value.
java.util.logging.SimpleFormatter if this property is not found or
has an invalid value.
null if this
property is not found or has an invalid value.
This class is not thread-safe.
| Constructor and Description |
|---|
ConsoleHandler()
Constructs a
ConsoleHandler object. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this handler.
|
void |
publish(LogRecord record)
Logs a record if necessary.
|
flush, isLoggable, setEncoding, setOutputStreamgetEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevelpublic void close()
System.err is flushed but not closed.close in class StreamHandlerpublic void publish(LogRecord record)
publish in class StreamHandlerrecord - the log record to be logged.