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
started
Fields 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 String
void
setIncludes
(Set<AccessAttribute> includes) void
setJsonProtocolVersion
(@Nullable String jsonProtocolVersion) void
setRequestAttributes
(Set<String> requestAttributes) void
setRequestHeaders
(Set<String> requestHeaders) void
setResponseHeaders
(Set<String> responseHeaders) toJsonMap
(ch.qos.logback.access.common.spi.IAccessEvent event) Converts the provided logging event to a genericMap
Methods inherited from class io.dropwizard.logging.json.layout.AbstractJsonLayout
doLayout
Methods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, start, stop
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManager
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:AbstractJsonLayout
Converts the provided logging event to a genericMap
- Specified by:
toJsonMap
in classAbstractJsonLayout<ch.qos.logback.access.common.spi.IAccessEvent>
-
getIncludes
-
setIncludes
-
getJsonProtocolVersion
-
setJsonProtocolVersion
-
getRequestHeaders
-
setRequestHeaders
-
getResponseHeaders
-
setResponseHeaders
-
getRequestAttributes
- Since:
- 2.0
-
setRequestAttributes
- Since:
- 2.0
-