public class ConsoleHandler extends OutputStreamHandler
System.out
by default.Modifier and Type | Class and Description |
---|---|
static class |
ConsoleHandler.Target
The target stream type.
|
outputLock
handlers, handlersUpdater
Constructor and Description |
---|
ConsoleHandler()
Construct a new instance.
|
ConsoleHandler(ConsoleHandler.Target target)
Construct a new instance.
|
ConsoleHandler(ConsoleHandler.Target target,
Formatter formatter)
Construct a new instance.
|
ConsoleHandler(Formatter formatter)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
setOutputStream(OutputStream outputStream)
Set the output stream to write to.
|
void |
setTarget(ConsoleHandler.Target target)
Set the target for this console handler.
|
getEncoding, setEncoding, setWriter
close, doPublish, flush, preWrite, safeClose
addHandler, checkAccess, checkAccess, clearHandlers, disableAccess, enableAccess, getHandlers, isAutoFlush, isCallerCalculationRequired, isCloseChildren, isEnabled, protect, publish, publish, removeHandler, setAutoFlush, setCloseChildren, setEnabled, setErrorManager, setFilter, setFormatter, setHandlers, setLevel, unprotect
getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError
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 © 2021 JBoss by Red Hat. All rights reserved.