|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<E>
ch.qos.logback.core.OutputStreamAppender<E>
public class OutputStreamAppender<E>
OutputStreamAppender appends events to a OutputStream
. This class
provides basic services that other appenders build upon.
For more information about this appender, please refer to the online manual
at http://logback.qos.ch/manual/appenders.html#OutputStreamAppender
Field Summary | |
---|---|
protected Encoder<E> |
encoder
It is the encoder which is ultimately responsible for writing the event to an OutputStream . |
protected Object |
lock
All synchronization in this class is done via the lock object. |
Fields inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase |
---|
name, started |
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
context |
Constructor Summary | |
---|---|
OutputStreamAppender()
|
Method Summary | |
---|---|
protected void |
append(E eventObject)
|
protected void |
closeOutputStream()
Close the underlying OutputStream . |
Encoder<E> |
getEncoder()
|
OutputStream |
getOutputStream()
The underlying output stream used by this appender. |
void |
setEncoder(Encoder<E> encoder)
|
void |
setLayout(Layout<E> layout)
|
void |
setOutputStream(OutputStream outputStream)
Sets the @link OutputStream} where the log output will go. |
void |
start()
Checks that requires parameters are set and if everything is in order, activates this appender. |
void |
stop()
Stop this appender instance. |
protected void |
subAppend(E event)
Actual writing occurs here. |
protected void |
writeOut(E event)
|
Methods inherited from class ch.qos.logback.core.UnsynchronizedAppenderBase |
---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString |
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
Field Detail |
---|
protected Encoder<E> encoder
OutputStream
.
protected Object lock
Constructor Detail |
---|
public OutputStreamAppender()
Method Detail |
---|
public OutputStream getOutputStream()
public void start()
start
in interface LifeCycle
start
in class UnsynchronizedAppenderBase<E>
public void setLayout(Layout<E> layout)
protected void append(E eventObject)
append
in class UnsynchronizedAppenderBase<E>
public void stop()
Stopped appenders cannot be reused.
stop
in interface LifeCycle
stop
in class UnsynchronizedAppenderBase<E>
protected void closeOutputStream()
OutputStream
.
public void setOutputStream(OutputStream outputStream)
Sets the @link OutputStream} where the log output will go. The specified
OutputStream
must be opened by the user and be writable. The
OutputStream
will be closed when the appender instance is
closed.
outputStream
- An already opened OutputStream.protected void writeOut(E event) throws IOException
IOException
protected void subAppend(E event)
Most subclasses of WriterAppender
will need to override this
method.
public Encoder<E> getEncoder()
public void setEncoder(Encoder<E> encoder)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |