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 Constructor Description EventJsonLayoutBaseFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
build(ch.qos.logback.classic.LoggerContext context, TimeZone timeZone)
protected ch.qos.logback.classic.pattern.ThrowableHandlingConverter
createThrowableProxyConverter(ch.qos.logback.classic.LoggerContext context)
ExceptionFormat
getExceptionFormat()
EnumSet<EventAttribute>
getIncludes()
Set<String>
getIncludesMdcKeys()
boolean
isFlattenMdc()
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
-
-
-
-
Method Detail
-
getIncludes
public EnumSet<EventAttribute> getIncludes()
-
setIncludes
public void setIncludes(EnumSet<EventAttribute> includes)
-
isFlattenMdc
public boolean isFlattenMdc()
-
setFlattenMdc
public void setFlattenMdc(boolean flattenMdc)
-
setExceptionFormat
public void setExceptionFormat(ExceptionFormat exceptionFormat)
- Since:
- 2.0
-
getExceptionFormat
@Nullable public ExceptionFormat 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)
-
-