Package io.dropwizard.logging.json
Class EventJsonLayoutBaseFactory
java.lang.Object
io.dropwizard.logging.json.AbstractJsonLayoutBaseFactory<ch.qos.logback.classic.spi.ILoggingEvent>
io.dropwizard.logging.json.EventJsonLayoutBaseFactory
- All Implemented Interfaces:
Discoverable
,DiscoverableLayoutFactory<ch.qos.logback.classic.spi.ILoggingEvent>
public class EventJsonLayoutBaseFactory
extends AbstractJsonLayoutBaseFactory<ch.qos.logback.classic.spi.ILoggingEvent>
Name | Default | Description |
---|---|---|
includes |
(level, threadName, mdc, loggerName, message, exception, timestamp, callerData) | Set of logging event attributes to include in the JSON map. |
includesMdcKeys |
(empty) | Set of MDC keys which should be included in the JSON map. By default includes everything. |
flattenMdc |
false |
Whether the MDC should be included under the key "mdc" or flattened into the map. |
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
protected ch.qos.logback.classic.pattern.ThrowableHandlingConverter
createThrowableProxyConverter
(ch.qos.logback.classic.LoggerContext context) @Nullable ExceptionFormat
boolean
void
setExceptionFormat
(ExceptionFormat exceptionFormat) void
setFlattenMdc
(boolean flattenMdc) void
setIncludes
(EnumSet<EventAttribute> includes) void
setIncludesMdcKeys
(Set<String> includesMdcKeys) Methods inherited from class io.dropwizard.logging.json.AbstractJsonLayoutBaseFactory
createDropwizardJsonFormatter, createTimestampFormatter, getAdditionalFields, getCustomFieldNames, getTimestampFormat, isAppendLineSeparator, isPrettyPrint, setAdditionalFields, setAppendLineSeparator, setCustomFieldNames, setPrettyPrint, setTimestampFormat
-
Constructor Details
-
EventJsonLayoutBaseFactory
public EventJsonLayoutBaseFactory()
-
-
Method Details
-
getIncludes
-
setIncludes
-
getIncludesMdcKeys
-
setIncludesMdcKeys
-
isFlattenMdc
public boolean isFlattenMdc() -
setFlattenMdc
public void setFlattenMdc(boolean flattenMdc) -
setExceptionFormat
- Since:
- 2.0
-
getExceptionFormat
- Since:
- 2.0
-
build
public ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent> build(ch.qos.logback.classic.LoggerContext context, TimeZone timeZone) -
createThrowableProxyConverter
protected ch.qos.logback.classic.pattern.ThrowableHandlingConverter createThrowableProxyConverter(ch.qos.logback.classic.LoggerContext context)
-