Class Log4j2ConfluenceControlCharsEscapedPatternLayoutBuilder
- java.lang.Object
-
- org.apache.log4j.builders.AbstractBuilder<org.apache.log4j.Layout>
-
- com.atlassian.confluence.impl.logging.log4j.layout.Log4j2ConfluencePatternLayoutBuilder
-
- com.atlassian.confluence.impl.logging.log4j.layout.Log4j2ConfluenceControlCharsEscapedPatternLayoutBuilder
-
- All Implemented Interfaces:
org.apache.log4j.builders.Builder<org.apache.log4j.Layout>
,org.apache.log4j.builders.layout.LayoutBuilder
,org.apache.log4j.builders.Parser<org.apache.log4j.Layout>
@Plugin(name="com.atlassian.confluence.impl.logging.ConfluenceControlCharsEscapedPatternLayout", category="Log4j Builder") public final class Log4j2ConfluenceControlCharsEscapedPatternLayoutBuilder extends Log4j2ConfluencePatternLayoutBuilder
A log4j2 pattern layout that escapes any control chars in a log message, i.e. U+0000 - U+001F -> - Any other control characters -> Encoded into its ꯍ equivalent escaped code point " -> \" \ -> \\- Since:
- 8.1
-
-
Constructor Summary
Constructors Constructor Description Log4j2ConfluenceControlCharsEscapedPatternLayoutBuilder(String prefix, Properties props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.xConfluencePatternLayout
with the multi-character pattern specifiers used by log4j2.xorg.apache.log4j.Layout
parse(org.apache.log4j.config.PropertiesConfiguration config)
org.apache.log4j.Layout
parse(Element element, org.apache.log4j.xml.XmlConfiguration config)
-
Methods inherited from class org.apache.log4j.builders.AbstractBuilder
buildFilters, getBooleanProperty, getBooleanProperty, getBooleanValueAttribute, getIntegerProperty, getLongProperty, getNameAttribute, getNameAttributeKey, getProperties, getProperty, getProperty, getValueAttribute, getValueAttribute, set, set, set, set, substVars
-
-
-
-
Constructor Detail
-
Log4j2ConfluenceControlCharsEscapedPatternLayoutBuilder
public Log4j2ConfluenceControlCharsEscapedPatternLayoutBuilder(String prefix, Properties props)
-
-
Method Detail
-
modifyPattern
protected String modifyPattern(String pattern)
Description copied from class:Log4j2ConfluencePatternLayoutBuilder
Since this needs to work with log4j1.x-era configurations, we need to substitute the single-character pattern specifiers used by the log4j1.xConfluencePatternLayout
with the multi-character pattern specifiers used by log4j2.x- Overrides:
modifyPattern
in classLog4j2ConfluencePatternLayoutBuilder
-
parse
public org.apache.log4j.Layout parse(org.apache.log4j.config.PropertiesConfiguration config)
- Specified by:
parse
in interfaceorg.apache.log4j.builders.Parser<org.apache.log4j.Layout>
-
parse
public org.apache.log4j.Layout parse(Element element, org.apache.log4j.xml.XmlConfiguration config)
- Specified by:
parse
in interfaceorg.apache.log4j.builders.Parser<org.apache.log4j.Layout>
-
-