Package org.apache.logging.log4j.kit.env
Interface PropertySource
- All Known Implementing Classes:
ContextualEnvironmentPropertySource
,ContextualJavaPropsPropertySource
public interface PropertySource
Basic interface to retrieve property values.
We can not reuse the property sources from 2.x, since those required some sort of log4j
prefix to be
included. In 3.x we want to use keys without a prefix.
-
Method Summary
Modifier and TypeMethodDescriptionint
Provides the priority of the property source.@Nullable String
getProperty
(String name) Gets the named property as a String.
-
Method Details
-
getPriority
int getPriority()Provides the priority of the property source.Sources with higher priority override values from sources with lower priority.
- Returns:
- priority value
-
getProperty
Gets the named property as a String.- Parameters:
name
- the name of the property to look up- Returns:
- the String value of the property or
null
if undefined.
-