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 Details

    • EventJsonLayoutBaseFactory

      public EventJsonLayoutBaseFactory()
  • Method Details

    • getIncludes

      public EnumSet<EventAttribute> getIncludes()
    • setIncludes

      public void setIncludes(EnumSet<EventAttribute> includes)
    • getIncludesMdcKeys

      public Set<String> getIncludesMdcKeys()
    • setIncludesMdcKeys

      public void setIncludesMdcKeys(Set<String> includesMdcKeys)
    • 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)
    • createThrowableProxyConverter

      protected ch.qos.logback.classic.pattern.ThrowableHandlingConverter createThrowableProxyConverter(ch.qos.logback.classic.LoggerContext context)