Class PropertiesPlugin
- java.lang.Object
-
- org.apache.logging.log4j.core.config.PropertiesPlugin
-
@Plugin(name="properties", category="Core", printObject=true) public final class PropertiesPlugin extends java.lang.Object
Handles properties defined in the configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PropertiesPlugin.NullLookup
-
Field Summary
Fields Modifier and Type Field Description private static StrSubstitutor
UNESCAPING_SUBSTITUTOR
-
Constructor Summary
Constructors Modifier Constructor Description private
PropertiesPlugin()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StrLookup
configureSubstitutor(Property[] properties, Configuration config)
Creates the Properties component.private static StrSubstitutor
createUnescapingSubstitutor()
Creates a newStrSubstitutor
which is configured with no lookups and does not handle defaults.(package private) static java.lang.String
unescape(java.lang.String input)
private static Property
unescape(Property input)
-
-
-
Field Detail
-
UNESCAPING_SUBSTITUTOR
private static final StrSubstitutor UNESCAPING_SUBSTITUTOR
-
-
Method Detail
-
configureSubstitutor
@PluginFactory public static StrLookup configureSubstitutor(@PluginElement("Properties") Property[] properties, @PluginConfiguration Configuration config)
Creates the Properties component.- Parameters:
properties
- An array of Property elements.config
- The Configuration.- Returns:
- An Interpolator that includes the configuration properties.
-
unescape
static java.lang.String unescape(java.lang.String input)
-
createUnescapingSubstitutor
private static StrSubstitutor createUnescapingSubstitutor()
Creates a newStrSubstitutor
which is configured with no lookups and does not handle defaults. This allows it to unescape one level of escaped lookups without any further processing or removing replacing${ctx:foo:-default}
withdefault
.
-
-