public class LayoutKafkaMessageEncoder<E> extends KafkaMessageEncoderBase<E>
Layout and a Charset and creates
a serialized string for each event using the given layout.| Constructor and Description |
|---|
LayoutKafkaMessageEncoder() |
LayoutKafkaMessageEncoder(ch.qos.logback.core.Layout<E> layout,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
doEncode(E event)
Encodes a loggingEvent into a byte array.
|
Charset |
getCharset() |
ch.qos.logback.core.Layout<E> |
getLayout() |
void |
setCharset(Charset charset) |
void |
setLayout(ch.qos.logback.core.Layout<E> layout) |
void |
start() |
isStarted, stoppublic void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class KafkaMessageEncoderBase<E>public byte[] doEncode(E event)
KafkaMessageEncoderevent - the loggingEvent to be encoded.public void setLayout(ch.qos.logback.core.Layout<E> layout)
public void setCharset(Charset charset)
public ch.qos.logback.core.Layout<E> getLayout()
public Charset getCharset()
Copyright © 2015–2016. All rights reserved.