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
| Modifier and Type | Field and Description |
|---|---|
| protected Encoder | encoder
It is the encoder which is ultimately responsible for writing the event to an
|
| pack-priv boolean | |
| private OutputStream | outputStream
This is the |
| protected final ReentrantLock | streamWriteLock
All synchronization in this class is done via the lock object. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected void | |
| pack-priv void | |
| pack-priv void | |
| public Encoder | |
| public OutputStream | |
| public boolean | |
| public void | |
| public void | |
| public void | |
| public void | setOutputStream(OutputStream
An already opened OutputStream. outputStream)Sets the @link OutputStream} where the log output will go. |
| public void | start()
Overrides ch. Implements ch. |
| public void | stop()
Overrides ch. Implements ch. |
| protected void | |
| protected final void | writeByteArrayToOutputStreamWithPossibleFlush(byte[] byteArray)
A simple method to write to an outputStream and flush the stream if immediateFlush is set to true. |
| private void | |
| protected void |
| encoder | back to summary |
|---|---|
| protected Encoder<E> encoder It is the encoder which is ultimately responsible for writing the event to an
| |
| immediateFlush | back to summary |
|---|---|
| pack-priv boolean immediateFlush | |
| outputStream | back to summary |
|---|---|
| private OutputStream outputStream This is the | |
| streamWriteLock | back to summary |
|---|---|
| protected final ReentrantLock streamWriteLock All synchronization in this class is done via the lock object. | |
| OutputStreamAppender | back to summary |
|---|---|
| public OutputStreamAppender() | |
| append | back to summary |
|---|---|
| protected void append(E eventObject) Implements abstract ch.
| |
| closeOutputStream | back to summary |
|---|---|
| protected void closeOutputStream() Close the underlying | |
| encoderClose | back to summary |
|---|---|
| pack-priv void encoderClose() | |
| encoderInit | back to summary |
|---|---|
| pack-priv void encoderInit() | |
| getEncoder | back to summary |
|---|---|
| public Encoder | |
| getOutputStream | back to summary |
|---|---|
| public OutputStream getOutputStream() The underlying output stream used by this appender. | |
| isImmediateFlush | back to summary |
|---|---|
| public boolean isImmediateFlush() | |
| setEncoder | back to summary |
|---|---|
| public void setEncoder(Encoder<E> encoder) | |
| setImmediateFlush | back to summary |
|---|---|
| public void setImmediateFlush(boolean immediateFlush) | |
| setLayout | back to summary |
|---|---|
| public void setLayout(Layout<E> layout) | |
| setOutputStream | back to summary |
|---|---|
| public void setOutputStream(OutputStream outputStream)
Sets the @link OutputStream} where the log output will go. The specified
| |
| start | back to summary |
|---|---|
| public void start() Overrides ch. Implements ch. Checks that requires parameters are set and if everything is in order, activates this appender. | |
| stop | back to summary |
|---|---|
| public void stop() Overrides ch. Implements ch. Stop this appender instance. The underlying stream or writer is also closed. Stopped appenders cannot be reused. | |
| subAppend | back to summary |
|---|---|
| protected void subAppend(E event) Actual writing occurs here.
Most subclasses of
| |
| writeByteArrayToOutputStreamWithPossibleFlush | back to summary |
|---|---|
| protected final void writeByteArrayToOutputStreamWithPossibleFlush(byte[] byteArray) throws IOException A simple method to write to an outputStream and flush the stream if immediateFlush is set to true.
| |
| writeBytes | back to summary |
|---|---|
| private void writeBytes(byte[] byteArray) throws IOException | |
| writeOut | back to summary |
|---|---|
| protected void writeOut(E event) throws IOException | |