Class PropertiesPlugin

java.lang.Object
org.apache.logging.log4j.core.config.PropertiesPlugin

@Plugin(name="properties", category="Core", printObject=true) public final class PropertiesPlugin extends Object
Handles properties defined in the configuration.
  • Field Details

    • UNESCAPING_SUBSTITUTOR

      private static final StrSubstitutor UNESCAPING_SUBSTITUTOR
  • Constructor Details

    • PropertiesPlugin

      private PropertiesPlugin()
  • Method Details

    • 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

      private static Property unescape(Property input)
    • unescape

      static String unescape(String input)
    • createUnescapingSubstitutor

      private static StrSubstitutor createUnescapingSubstitutor()
      Creates a new StrSubstitutor 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} with default.