Class EventJsonLayout
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.LayoutBase<E>
io.dropwizard.logging.json.layout.AbstractJsonLayout<ch.qos.logback.classic.spi.ILoggingEvent>
io.dropwizard.logging.json.layout.EventJsonLayout
- All Implemented Interfaces:
ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent>,ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle
Builds JSON messages from logging events of the type
ILoggingEvent.-
Field Summary
Fields inherited from class ch.qos.logback.core.LayoutBase
startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
ConstructorsConstructorDescriptionEventJsonLayout(JsonFormatter jsonFormatter, TimestampFormatter timestampFormatter, ch.qos.logback.classic.pattern.ThrowableHandlingConverter throwableProxyConverter, Set<EventAttribute> includes, Map<String, String> customFieldNames, Map<String, Object> additionalFields, Set<String> includesMdcKeys, boolean flattenMdc) -
Method Summary
Modifier and TypeMethodDescription@Nullable StringvoidsetIncludes(Set<EventAttribute> includes) voidsetIncludesMdcKeys(Set<String> includesMdcKeys) voidsetJsonProtocolVersion(@Nullable String jsonProtocolVersion) voidstart()voidstop()toJsonMap(ch.qos.logback.classic.spi.ILoggingEvent event) Converts the provided logging event to a genericMapMethods inherited from class io.dropwizard.logging.json.layout.AbstractJsonLayout
doLayoutMethods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeaderMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerMethods inherited from class java.lang.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
-
Constructor Details
-
EventJsonLayout
public EventJsonLayout(JsonFormatter jsonFormatter, TimestampFormatter timestampFormatter, ch.qos.logback.classic.pattern.ThrowableHandlingConverter throwableProxyConverter, Set<EventAttribute> includes, Map<String, String> customFieldNames, Map<String, Object> additionalFields, Set<String> includesMdcKeys, boolean flattenMdc)
-
-
Method Details
-
start
public void start()- Specified by:
startin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
startin classch.qos.logback.core.LayoutBase<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.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
toJsonMap
Description copied from class:AbstractJsonLayoutConverts the provided logging event to a genericMap- Specified by:
toJsonMapin classAbstractJsonLayout<ch.qos.logback.classic.spi.ILoggingEvent>
-
getIncludes
-
setIncludes
-
getJsonProtocolVersion
-
setJsonProtocolVersion
-
getIncludesMdcKeys
-
setIncludesMdcKeys
-