ch.qos.logback.access
Class PatternLayout
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.LayoutBase<E>
ch.qos.logback.core.pattern.PatternLayoutBase<AccessEvent>
ch.qos.logback.access.PatternLayout
- All Implemented Interfaces:
- Layout<AccessEvent>, ContextAware, LifeCycle
public class PatternLayout
- extends PatternLayoutBase<AccessEvent>
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
.
For more information about this layout, please refer to the online manual at
http://logback.qos.ch/manual/layouts.html#AccessPatternLayout
- Author:
- Ceki Gülcü, Sébastien Pennec
Methods inherited from class ch.qos.logback.core.LayoutBase |
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stop |
defaultConverterMap
public static final Map<String,String> defaultConverterMap
CLF_PATTERN
public static String CLF_PATTERN
CLF_PATTERN_NAME
public static String CLF_PATTERN_NAME
CLF_PATTERN_NAME_2
public static String CLF_PATTERN_NAME_2
COMBINED_PATTERN
public static String COMBINED_PATTERN
COMBINED_PATTERN_NAME
public static String COMBINED_PATTERN_NAME
PatternLayout
public PatternLayout()
getDefaultConverterMap
public Map<String,String> getDefaultConverterMap()
- Returns the default converter map for this instance.
- Specified by:
getDefaultConverterMap
in class PatternLayoutBase<AccessEvent>
- Returns:
- A map associating pattern words to the names of converter classes
postCompileProcessing
protected void postCompileProcessing(Converter<AccessEvent> head)
- Add a line separator so that each line is on a separate line.
- Overrides:
postCompileProcessing
in class PatternLayoutBase<AccessEvent>
doLayout
public String doLayout(AccessEvent event)
- 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
public void start()
- Specified by:
start
in interface LifeCycle
- Overrides:
start
in class PatternLayoutBase<AccessEvent>
Copyright © 2005-2008 QOS.ch. All Rights Reserved.