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, PatternLayout
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final intprotected boolean(package private) Stringprotected PostCompileProcessor<E> Fields inherited from class LayoutBase
startedFields inherited from class ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConcrete implementations of this class are responsible for elaborating the mapping between pattern words and converters.Returns a map where the default converter map is merged with the map contained in the context.Return the header of the logging event formatting.protected Stringbooleanprotected voidsetContextForConverters(Converter<E> head) Deprecated.voidsetOutputPatternAsHeader(boolean outputPatternAsHeader) voidsetPattern(String pattern) voidsetPostCompileProcessor(PostCompileProcessor<E> postCompileProcessor) voidstart()toString()protected StringwriteLoopOnConverters(E event) Methods inherited from class LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stopMethods inherited from class ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
INTIAL_STRING_BUILDER_SIZE
static final int INTIAL_STRING_BUILDER_SIZE- See Also:
-
head
-
pattern
String pattern -
postCompileProcessor
-
instanceConverterMap
-
outputPatternAsHeader
protected boolean outputPatternAsHeader
-
-
Constructor Details
-
PatternLayoutBase
public PatternLayoutBase()
-
-
Method Details
-
getDefaultConverterMap
-
getEffectiveConverterMap
-
start
public void start()- Specified by:
startin interfaceLifeCycle- Overrides:
startin classLayoutBase<E>
-
setPostCompileProcessor
-
setContextForConverters
Deprecated.UseConverterUtil.setContextForConverters(Context, Converter)instead. This method will be removed in future releases.- Parameters:
head-
-
writeLoopOnConverters
-
getPattern
-
setPattern
-
toString
-
getInstanceConverterMap
-
getPresentationHeaderPrefix
-
isOutputPatternAsHeader
public boolean isOutputPatternAsHeader() -
setOutputPatternAsHeader
public void setOutputPatternAsHeader(boolean outputPatternAsHeader) -
getPresentationHeader
Description copied from interface:LayoutReturn the header of the logging event formatting. The returned value may be null.- Specified by:
getPresentationHeaderin interfaceLayout<E>- Overrides:
getPresentationHeaderin classLayoutBase<E>- Returns:
- The header.
-
ConverterUtil.setContextForConverters(Context, Converter)instead.