Package ch.qos.logback.access
Class PatternLayout
- All Implemented Interfaces:
Layout<IAccessEvent>
,ContextAware
,LifeCycle
This class is a module-specific implementation of
PatternLayout
to allow http-specific patterns
to be used. The ch.qos.logback.access.PatternLayout
provides a
way to format the logging output that is just as easy and flexible as the
usual PatternLayout
.
- Author:
- Ceki Gülcü, Sébastien Pennec
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class ch.qos.logback.core.pattern.PatternLayoutBase
outputPatternAsHeader, postCompileProcessor
Fields inherited from class ch.qos.logback.core.LayoutBase
started
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondoLayout
(IAccessEvent event) Transform an event (of type Object) and return it as a String after appropriate formatting.Returns the default converter map for this instance.protected String
void
start()
Methods inherited from class ch.qos.logback.core.pattern.PatternLayoutBase
getEffectiveConverterMap, getInstanceConverterMap, getPattern, getPresentationHeader, isOutputPatternAsHeader, setContextForConverters, setOutputPatternAsHeader, setPattern, setPostCompileProcessor, toString, writeLoopOnConverters
Methods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stop
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManager
-
Field Details
-
defaultConverterMap
-
HEADER_PREFIX
- See Also:
-
CLF_PATTERN
- See Also:
-
CLF_PATTERN_NAME
- See Also:
-
CLF_PATTERN_NAME_2
- See Also:
-
COMBINED_PATTERN
- See Also:
-
COMBINED_PATTERN_NAME
- See Also:
-
-
Constructor Details
-
PatternLayout
public PatternLayout()
-
-
Method Details
-
getDefaultConverterMap
Returns the default converter map for this instance.- Specified by:
getDefaultConverterMap
in classPatternLayoutBase<IAccessEvent>
- Returns:
- A map associating pattern words to the names of converter classes
-
doLayout
Description copied from interface:Layout
Transform an event (of type Object) and return it as a String after appropriate formatting.Taking in an object and returning a String is the least sophisticated way of formatting events. However, it is remarkably CPU-effective.
- Parameters:
event
- The event to format- Returns:
- the event formatted as a String
-
start
- Specified by:
start
in interfaceLifeCycle
- Overrides:
start
in classPatternLayoutBase<IAccessEvent>
-
getPresentationHeaderPrefix
- Overrides:
getPresentationHeaderPrefix
in classPatternLayoutBase<IAccessEvent>
-