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 classPropertiesPlugin.NullLookup
-
Field Summary
Fields Modifier and Type Field Description private static StrSubstitutorUNESCAPING_SUBSTITUTOR
-
Constructor Summary
Constructors Modifier Constructor Description privatePropertiesPlugin()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StrLookupconfigureSubstitutor(Property[] properties, Configuration config)Creates the Properties component.private static StrSubstitutorcreateUnescapingSubstitutor()Creates a newStrSubstitutorwhich is configured with no lookups and does not handle defaults.(package private) static java.lang.Stringunescape(java.lang.String input)private static Propertyunescape(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 newStrSubstitutorwhich 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.
-
-