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. flattenMdcfalseWhether 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)Creates aLayoutBaseof type Eprotected ch.qos.logback.classic.pattern.ThrowableHandlingConvertercreateThrowableProxyConverter(ch.qos.logback.classic.LoggerContext context)@Nullable ExceptionFormatgetExceptionFormat()EnumSet<EventAttribute>getIncludes()Set<String>getIncludesMdcKeys()booleanisFlattenMdc()voidsetExceptionFormat(ExceptionFormat exceptionFormat)voidsetFlattenMdc(boolean flattenMdc)voidsetIncludes(EnumSet<EventAttribute> includes)voidsetIncludesMdcKeys(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
public @Nullable 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)Description copied from interface:DiscoverableLayoutFactoryCreates aLayoutBaseof type E- Parameters:
context- the Logback contexttimeZone- the TimeZone- Returns:
- a new
LayoutBase
-
createThrowableProxyConverter
protected ch.qos.logback.classic.pattern.ThrowableHandlingConverter createThrowableProxyConverter(ch.qos.logback.classic.LoggerContext context)
-
-