Closeable
, Flushable
, AutoCloseable
, FlushableCloseable
, Protectable
public class ConsoleHandler extends OutputStreamHandler
System.out
by default.Modifier and Type | Class | Description |
---|---|---|
static class |
ConsoleHandler.Target |
The target stream type.
|
handlers, handlersUpdater
outputLock
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, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setEnabled, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotect
getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getEncoding, setEncoding, setWriter
public 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 OutputStreamHandler
outputStream
- the new output stream or null
for noneCopyright © 2019 JBoss by Red Hat. All rights reserved.