Closeable, Flushable, AutoCloseable, FlushableCloseable, Protectablepublic class ConsoleHandler extends OutputStreamHandler
System.out by default.| Modifier and Type | Class | Description |
|---|---|---|
static class |
ConsoleHandler.Target |
The target stream type.
|
handlers, handlersUpdateroutputLock| Constructor | Description |
|---|---|
ConsoleHandler() |
Construct a new instance.
|
ConsoleHandler(Formatter formatter) |
Construct a new instance.
|
ConsoleHandler(ConsoleHandler.Target target) |
Construct a new instance.
|
ConsoleHandler(ConsoleHandler.Target target,
Formatter formatter) |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
setOutputStream(OutputStream outputStream) |
Set the output stream to write to.
|
void |
setTarget(ConsoleHandler.Target target) |
Set the target for this console handler.
|
addHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, getHandlers, isAutoFlush, isCallerCalculationRequired, isCloseChildren, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setCloseChildren, setEnabled, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotectgetErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEncoding, setEncoding, setWriterpublic ConsoleHandler()
public ConsoleHandler(Formatter formatter)
formatter - the formatter to usepublic ConsoleHandler(ConsoleHandler.Target target)
target - the target to write to, or null to start with an uninitialized targetpublic ConsoleHandler(ConsoleHandler.Target target, Formatter formatter)
target - the target to write to, or null to start with an uninitialized targetformatter - the formatter to usepublic void setTarget(ConsoleHandler.Target target)
target - the target to write to, or null to clear the targetpublic void setOutputStream(OutputStream outputStream)
setOutputStream in class OutputStreamHandleroutputStream - the new output stream or null for noneCopyright © 2020 JBoss by Red Hat. All rights reserved.