Class Property
- java.lang.Object
-
- org.apache.logging.log4j.core.config.Property
-
@Plugin(name="property", category="Core", printObject=true) public final class Property extends Object
Represents a key/value pair in the configuration.
-
-
Field Summary
Fields Modifier and Type Field Description static Property[]EMPTY_ARRAY
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PropertycreateProperty(String name, String value)Creates a Property.StringgetName()Returns the property name.StringgetValue()Returns the property value.booleanisValueNeedsLookup()Returnstrueif the value contains a substitutable property that requires a lookup to be resolved.StringtoString()
-
-
-
Field Detail
-
EMPTY_ARRAY
public static final Property[] EMPTY_ARRAY
- Since:
- 2.11.2
-
-
Method Detail
-
getName
public String getName()
Returns the property name.- Returns:
- the property name.
-
getValue
public String getValue()
Returns the property value.- Returns:
- the value of the property.
-
isValueNeedsLookup
public boolean isValueNeedsLookup()
Returnstrueif the value contains a substitutable property that requires a lookup to be resolved.- Returns:
trueif the value contains {@code "${"}, {@code false} otherwise
-
createProperty
@PluginFactory public static Property createProperty(@PluginAttribute("name") String name, @PluginValue("value") String value)
Creates a Property.- Parameters:
name- The key.value- The value.- Returns:
- A Property.
-
-