java.lang.Object
- All Implemented Interfaces:
Layout<ILoggingEvent>,ContextAware,LifeCycle
A flexible layout configurable with pattern string. The main method in this class is
to doLayout(ILoggingEvent). It returns the results as a
{#link String}. The format and contents of the result depends on the conversion
pattern.
For more information about this layout, please refer to the online manual at http://logback.qos.ch/manual/layouts.html#PatternLayout
-
Field Summary
FieldsModifier and TypeFieldDescriptionDeprecated.static final Map<String, Supplier<DynamicConverter>> Deprecated.replaced byDEFAULT_CONVERTER_MAPin turn itself replaced byDEFAULT_CONVERTER_SUPPLIER_MAPstatic final StringFields inherited from class ch.qos.logback.core.pattern.PatternLayoutBase
outputPatternAsHeader, postCompileProcessorFields inherited from class ch.qos.logback.core.LayoutBase
startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class ch.qos.logback.core.pattern.PatternLayoutBase
getEffectiveConverterMap, getInstanceConverterMap, getPattern, getPresentationHeader, isOutputPatternAsHeader, setContextForConverters, setOutputPatternAsHeader, setPattern, setPostCompileProcessor, start, toString, writeLoopOnConvertersMethods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stopMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManager
-
Field Details
-
DEFAULT_CONVERTER_SUPPLIER_MAP
-
DEFAULT_CONVERTER_MAP
Deprecated.replaced byDEFAULT_CONVERTER_SUPPLIER_MAP -
CONVERTER_CLASS_TO_KEY_MAP
-
defaultConverterMap
Deprecated.replaced byDEFAULT_CONVERTER_MAPin turn itself replaced byDEFAULT_CONVERTER_SUPPLIER_MAP -
HEADER_PREFIX
- See Also:
-
-
Constructor Details
-
PatternLayout
public PatternLayout()
-
-
Method Details
-
getDefaultConverterSupplierMap
- Specified by:
getDefaultConverterSupplierMapin classPatternLayoutBase<ILoggingEvent>
-
getDefaultConverterMap
Deprecated.BEWARE: The map of type String,String for mapping conversion words is deprecated. Use
getDefaultConverterSupplierMap()instead.Existing code such as getDefaultMap().put("k", X.class.getName()) should be replaced by getDefaultConverterSupplierMap().put("k", X::new)
Note that values in the map will still be taken into account and processed correctly.
- Specified by:
getDefaultConverterMapin classPatternLayoutBase<ILoggingEvent>- Returns:
- a map of keys and class names
-
doLayout
-
getPresentationHeaderPrefix
- Overrides:
getPresentationHeaderPrefixin classPatternLayoutBase<ILoggingEvent>
-
DEFAULT_CONVERTER_SUPPLIER_MAP