@Plugin(name="com.atlassian.confluence.impl.logging.ConfluencePatternLayout",
category="Log4j Builder")
@PluginAliases(value="com.atlassian.logging.log4j.NewLineIndentingFilteringPatternLayout")
public final class Log4j2ConfluencePatternLayoutBuilder
extends org.apache.log4j.builders.AbstractBuilder
Plugin that constructs a Log4j1.x Layout that emulates ConfluencePatternLayout
as used under log4j1.x. This is for use by log4j2.x under its log4j1.x emulation mode.
This class is based upon PatternLayoutBuilder, but adds the custom pattern converters used by ConfluencePatternLayout.| Constructor and Description |
|---|
Log4j2ConfluencePatternLayoutBuilder(String prefix,
Properties props) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
modifyPattern(String pattern)
Since this needs to work with log4j1.x-era configurations, we need to substitute the single-character pattern
specifiers used by the log4j1.x
ConfluencePatternLayout with the multi-character pattern specifiers
used by log4j2.x |
org.apache.log4j.Layout |
parseLayout(Element element,
org.apache.log4j.xml.XmlConfiguration config) |
org.apache.log4j.Layout |
parseLayout(org.apache.log4j.config.PropertiesConfiguration config) |
public Log4j2ConfluencePatternLayoutBuilder(String prefix, Properties props)
protected String modifyPattern(String pattern)
ConfluencePatternLayout with the multi-character pattern specifiers
used by log4j2.xpublic org.apache.log4j.Layout parseLayout(org.apache.log4j.config.PropertiesConfiguration config)
parseLayout in interface org.apache.log4j.builders.layout.LayoutBuilderpublic org.apache.log4j.Layout parseLayout(Element element, org.apache.log4j.xml.XmlConfiguration config)
parseLayout in interface org.apache.log4j.builders.layout.LayoutBuilderCopyright © 2003–2022 Atlassian. All rights reserved.