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
- See Also:
-
Field Summary
Fields inherited from class ch.qos.logback.core.encoder.EncoderBase
started
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
encode
(ch.qos.logback.classic.spi.ILoggingEvent event) byte[]
byte[]
void
setCharset
(Charset charset) void
void
start()
void
stop()
Methods inherited from class ch.qos.logback.core.encoder.EncoderBase
isStarted
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
start
in interfacech.qos.logback.core.spi.LifeCycle
- Overrides:
start
in classch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
stop
public void stop()- Specified by:
stop
in interfacech.qos.logback.core.spi.LifeCycle
- Overrides:
stop
in classch.qos.logback.core.encoder.EncoderBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
headerBytes
public byte[] headerBytes() -
encode
public byte[] encode(ch.qos.logback.classic.spi.ILoggingEvent event)
-