|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
E
- event typepublic interface Encoder<E>
Encoders are responsible for transform an incoming event into a byte array
*and* writing out the byte array onto the appropriate OutputStream
.
Thus, encoders have total control of what and when gets written to the
OutputStream
maintained by the owning appender.
Method Summary | |
---|---|
void |
close()
This method is called prior to the closing of the underling OutputStream . |
void |
doEncode(E event)
Encode and write an event to the appropriate OutputStream . |
void |
init(OutputStream os)
This method is called when the owning appender starts or whenever output needs to be directed to a new OutputStream, for instance as a result of a rollover. |
Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
Methods inherited from interface ch.qos.logback.core.spi.LifeCycle |
---|
isStarted, start, stop |
Method Detail |
---|
void init(OutputStream os) throws IOException
os
-
IOException
void doEncode(E event) throws IOException
OutputStream
.
Implementations are free to differ writing out of the encoded event and
instead write in batches.
event
-
IOException
void close() throws IOException
OutputStream
. Implementations MUST not close the underlying
OutputStream
which is the responsibility of the owning appender.
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |