Class StructuredLogEncoder
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.encoder.EncoderBase<ILoggingEvent>
org.springframework.boot.logging.logback.StructuredLogEncoder
- All Implemented Interfaces:
Encoder<ILoggingEvent>, ContextAware, LifeCycle
Logback encoder for structured logging.- Since:
- 3.4.0
- Author:
- Moritz Halbritter, Phillip Webb
- See Also:
-
Field Summary
Fields inherited from class EncoderBase
startedFields inherited from class ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]encode(ILoggingEvent event) byte @Nullable []byte @Nullable []voidsetCharset(@Nullable Charset charset) voidvoidstart()voidstop()Methods inherited from class EncoderBase
isStartedMethods inherited from class 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 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 interfaceLifeCycle- Overrides:
startin classEncoderBase<ILoggingEvent>
-
stop
public void stop()- Specified by:
stopin interfaceLifeCycle- Overrides:
stopin classEncoderBase<ILoggingEvent>
-
headerBytes
-
encode
-