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.spi.IAccessEvent>
-
- io.dropwizard.logging.json.layout.AccessJsonLayout
-
- All Implemented Interfaces:
ch.qos.logback.core.Layout<ch.qos.logback.access.spi.IAccessEvent>
,ch.qos.logback.core.spi.ContextAware
,ch.qos.logback.core.spi.LifeCycle
public class AccessJsonLayout extends AbstractJsonLayout<ch.qos.logback.access.spi.IAccessEvent>
Builds JSON messages from access log events asIAccessEvent
.
-
-
Constructor Summary
Constructors Constructor Description AccessJsonLayout(JsonFormatter jsonFormatter, TimestampFormatter timestampFormatter, Set<AccessAttribute> includes, Map<String,String> customFieldNames, Map<String,Object> additionalFields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<AccessAttribute>
getIncludes()
String
getJsonProtocolVersion()
Set<String>
getRequestAttributes()
Set<String>
getRequestHeaders()
Set<String>
getResponseHeaders()
void
setIncludes(Set<AccessAttribute> includes)
void
setJsonProtocolVersion(String jsonProtocolVersion)
void
setRequestAttributes(Set<String> requestAttributes)
void
setRequestHeaders(Set<String> requestHeaders)
void
setResponseHeaders(Set<String> responseHeaders)
protected Map<String,Object>
toJsonMap(ch.qos.logback.access.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
-
-
-
-
Constructor Detail
-
AccessJsonLayout
public AccessJsonLayout(JsonFormatter jsonFormatter, TimestampFormatter timestampFormatter, Set<AccessAttribute> includes, Map<String,String> customFieldNames, Map<String,Object> additionalFields)
-
-
Method Detail
-
toJsonMap
protected Map<String,Object> toJsonMap(ch.qos.logback.access.spi.IAccessEvent event)
Description copied from class:AbstractJsonLayout
Converts the provided logging event to a genericMap
- Specified by:
toJsonMap
in classAbstractJsonLayout<ch.qos.logback.access.spi.IAccessEvent>
-
getIncludes
public Set<AccessAttribute> getIncludes()
-
setIncludes
public void setIncludes(Set<AccessAttribute> includes)
-
getJsonProtocolVersion
@Nullable public String getJsonProtocolVersion()
-
setJsonProtocolVersion
public void setJsonProtocolVersion(@Nullable String jsonProtocolVersion)
-
-