public class ConsoleHandler extends StreamHandler
Configuration: By default each ConsoleHandler is initialized to the Log level Level.INFO and will use the Formatter class java.util.logging.SimpleFormatter.
Constructor and Description |
---|
ConsoleHandler()
Create a ConsoleHandler for System.err.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Override StreamHandler.close to do a flush but not
to close the output stream.
|
void |
publish(LogRecord record)
Publish a LogRecord.
|
flush, isLoggable, setEncoding, setOutputStream
getEncoding, getFilter, getFormatter, getLevel, reportError, setFilter, setFormatter, setLevel
public void close()
close
in class StreamHandler
public void publish(LogRecord record)
The logging request was made initially to a Logger object, which initialized the LogRecord and forwarded it here.
publish
in class StreamHandler
record
- description of the log event. A null record is
silently ignored and is not publishedCopyright (c) 2014, Oracle and/or its affiliates. All rights reserved. Use of this specification is subject to license terms.