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
started
Fields 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 String
void
setIncludes
(Set<EventAttribute> includes) void
setIncludesMdcKeys
(Set<String> includesMdcKeys) void
setJsonProtocolVersion
(@Nullable String jsonProtocolVersion) void
start()
void
stop()
toJsonMap
(ch.qos.logback.classic.spi.ILoggingEvent event) Converts the provided logging event to a genericMap
Methods inherited from class io.dropwizard.logging.json.layout.AbstractJsonLayout
doLayout
Methods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManager
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
-
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:
start
in interfacech.qos.logback.core.spi.LifeCycle
- Overrides:
start
in classch.qos.logback.core.LayoutBase<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.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
toJsonMap
Description copied from class:AbstractJsonLayout
Converts the provided logging event to a genericMap
- Specified by:
toJsonMap
in classAbstractJsonLayout<ch.qos.logback.classic.spi.ILoggingEvent>
-
getIncludes
-
setIncludes
-
getJsonProtocolVersion
-
setJsonProtocolVersion
-
getIncludesMdcKeys
-
setIncludesMdcKeys
-