Class StructuredLogEncoder
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
org.springframework.boot.logging.logback.StructuredLogEncoder
- All Implemented Interfaces:
ch.qos.logback.core.encoder.Encoder<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycle
public class StructuredLogEncoder
extends ch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
Logback encoder for structured logging.- Since:
- 3.4.0
- Author:
- Moritz Halbritter, Phillip Webb
- See Also:
-
Field Summary
Fields inherited from class ch.qos.logback.core.encoder.EncoderBase
startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encode(ch.qos.logback.classic.spi.ILoggingEvent event) byte @Nullable []byte @Nullable []voidsetCharset(@Nullable Charset charset) voidvoidstart()voidstop()Methods inherited from class ch.qos.logback.core.encoder.EncoderBase
isStartedMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Constructor Details
-
StructuredLogEncoder
public StructuredLogEncoder()
-
-
Method Details
-
setFormat
-
setCharset
-
start
public void start()- Specified by:
startin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
startin classch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
stop
public void stop()- Specified by:
stopin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
stopin classch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
headerBytes
public byte @Nullable [] headerBytes() -
encode
public byte[] encode(ch.qos.logback.classic.spi.ILoggingEvent event)
-