Top Description Methods
ch.qos.logback.core.encoder

public Interface Encoder<E>

extends ContextAware, LifeCycle
Known Direct Implementers
ch.qos.logback.core.encoder.EncoderBase
Type Parameters
<E>
event type
Imports
ch.qos.logback.core.spi.ContextAware, .LifeCycle

Encoders are responsible for transform an incoming event into a byte array
Authors
Ceki Gülcü, Joern Huxhorn, Maarten Bosteels
Since
0.9.19

Method Summary

Modifier and TypeMethod and Description
public byte[]
encode(E event)

Encode an event as bytes.

public byte[]

Returns:

footer bytes. Null values are allowed.
footerBytes
()

Get footer bytes.

public byte[]

Returns:

header bytes. Null values are allowed.
headerBytes
()

Get header bytes.

Inherited from ch.qos.logback.core.spi.ContextAware:
addErroraddErroraddInfoaddInfoaddStatusaddWarnaddWarngetContextsetContext
Inherited from ch.qos.logback.core.spi.LifeCycle:
isStartedstartstop

Method Detail

encodeback to summary
public byte[] encode(E event)

Encode an event as bytes.

footerBytesback to summary
public byte[] footerBytes()

Get footer bytes. This method is typically called prior to the closing of the stream where events are written.

Returns:byte[]

footer bytes. Null values are allowed.

headerBytesback to summary
public byte[] headerBytes()

Get header bytes. This method is typically called upon opening of an output stream.

Returns:byte[]

header bytes. Null values are allowed.