ch.qos.logback.core.pattern
Class PatternLayoutBase<E>
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.LayoutBase<E>
ch.qos.logback.core.pattern.PatternLayoutBase<E>
- All Implemented Interfaces:
- Layout<E>, ContextAware, LifeCycle
- Direct Known Subclasses:
- PatternLayout
public abstract class PatternLayoutBase<E>
- extends LayoutBase<E>
Methods inherited from class ch.qos.logback.core.LayoutBase |
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stop |
postCompileProcessor
protected PostCompileProcessor<E> postCompileProcessor
outputPatternAsHeader
protected boolean outputPatternAsHeader
PatternLayoutBase
public PatternLayoutBase()
getDefaultConverterMap
public abstract Map<String,String> getDefaultConverterMap()
- Concrete implementations of this class are responsible for elaborating the
mapping between pattern words and converters.
- Returns:
- A map associating pattern words to the names of converter classes
getEffectiveConverterMap
public Map<String,String> getEffectiveConverterMap()
- Returns a map where the default converter map is merged with the map
contained in the context.
start
public void start()
- Specified by:
start
in interface LifeCycle
- Overrides:
start
in class LayoutBase<E>
setPostCompileProcessor
public void setPostCompileProcessor(PostCompileProcessor<E> postCompileProcessor)
setContextForConverters
protected void setContextForConverters(Converter<E> head)
- Deprecated. Use
ConverterUtil.setContextForConverters(ch.qos.logback.core.Context, ch.qos.logback.core.pattern.Converter)
instead. This method will
be removed in future releases.
- Parameters:
head
-
writeLoopOnConverters
protected String writeLoopOnConverters(E event)
getPattern
public String getPattern()
setPattern
public void setPattern(String pattern)
toString
public String toString()
- Overrides:
toString
in class Object
getInstanceConverterMap
public Map<String,String> getInstanceConverterMap()
getPresentationHeaderPrefix
protected String getPresentationHeaderPrefix()
isOutputPatternAsHeader
public boolean isOutputPatternAsHeader()
setOutputPatternAsHeader
public void setOutputPatternAsHeader(boolean outputPatternAsHeader)
getPresentationHeader
public String getPresentationHeader()
- Description copied from interface:
Layout
- Return the header of the logging event formatting. The returned value
may be null.
- Specified by:
getPresentationHeader
in interface Layout<E>
- Overrides:
getPresentationHeader
in class LayoutBase<E>
- Returns:
- The header.
Copyright © 2005-2013 QOS.ch. All Rights Reserved.