org.apache.log.output.io
public class StreamTarget extends AbstractOutputTarget
m_formatter
Constructor and Description |
---|
StreamTarget(java.io.OutputStream outputStream,
Formatter formatter)
Constructor that writes to a stream and uses a particular formatter.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Shutdown target.
|
protected void |
setOutputStream(java.io.OutputStream outputStream)
Set the output stream.
|
protected void |
shutdownStream()
Shutdown output stream.
|
protected void |
write(java.lang.String data)
Abstract method that will output event.
|
doProcessEvent, getFormatter, open, output, setFormatter
error, getErrorHandler, isOpen, processEvent, setErrorHandler
public StreamTarget(java.io.OutputStream outputStream, Formatter formatter)
outputStream
- the OutputStream to write toformatter
- the Formatter to useprotected void setOutputStream(java.io.OutputStream outputStream)
outputStream
- the new OutputStreamprotected void write(java.lang.String data)
write
in class AbstractOutputTarget
data
- the data to be outputpublic void close()
close
in class AbstractOutputTarget
protected void shutdownStream()