Class AccessJsonLayout
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.LayoutBase<E>
io.dropwizard.logging.json.layout.AbstractJsonLayout<ch.qos.logback.access.common.spi.IAccessEvent>
io.dropwizard.logging.json.layout.AccessJsonLayout
- All Implemented Interfaces:
ch.qos.logback.core.Layout<ch.qos.logback.access.common.spi.IAccessEvent>,ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle
public class AccessJsonLayout
extends AbstractJsonLayout<ch.qos.logback.access.common.spi.IAccessEvent>
Builds JSON messages from access log events as
IAccessEvent.-
Field Summary
Fields inherited from class ch.qos.logback.core.LayoutBase
startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
ConstructorsConstructorDescriptionAccessJsonLayout(JsonFormatter jsonFormatter, TimestampFormatter timestampFormatter, Set<AccessAttribute> includes, Map<String, String> customFieldNames, Map<String, Object> additionalFields) -
Method Summary
Modifier and TypeMethodDescription@Nullable StringvoidsetIncludes(Set<AccessAttribute> includes) voidsetJsonProtocolVersion(@Nullable String jsonProtocolVersion) voidsetRequestAttributes(Set<String> requestAttributes) voidsetRequestHeaders(Set<String> requestHeaders) voidsetResponseHeaders(Set<String> responseHeaders) toJsonMap(ch.qos.logback.access.common.spi.IAccessEvent event) Converts the provided logging event to a genericMapMethods inherited from class io.dropwizard.logging.json.layout.AbstractJsonLayout
doLayoutMethods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, start, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn
-
Constructor Details
-
AccessJsonLayout
public AccessJsonLayout(JsonFormatter jsonFormatter, TimestampFormatter timestampFormatter, Set<AccessAttribute> includes, Map<String, String> customFieldNames, Map<String, Object> additionalFields)
-
-
Method Details
-
toJsonMap
Description copied from class:AbstractJsonLayoutConverts the provided logging event to a genericMap- Specified by:
toJsonMapin classAbstractJsonLayout<ch.qos.logback.access.common.spi.IAccessEvent>
-
getIncludes
-
setIncludes
-
getJsonProtocolVersion
-
setJsonProtocolVersion
-
getRequestHeaders
-
setRequestHeaders
-
getResponseHeaders
-
setResponseHeaders
-
getRequestAttributes
- Since:
- 2.0
-
setRequestAttributes
- Since:
- 2.0
-