Package org.apache.logging.log4j.util
Class PropertiesUtil.Environment
- java.lang.Object
-
- org.apache.logging.log4j.util.PropertiesUtil.Environment
-
- Enclosing class:
- PropertiesUtil
private static final class PropertiesUtil.Environment extends java.lang.ObjectProvides support for looking up global configuration properties via environment variables, property files, and system properties, in three variations:Normalized: all log4j-related prefixes removed, remaining property is camelCased with a log4j2 prefix for property files and system properties, or follows a LOG4J_FOO_BAR format for environment variables.
Legacy: the original property name as defined in the source pre-2.10.0.
Tokenized: loose matching based on word boundaries.
- Since:
- 2.10.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.ThreadLocal<PropertySource>CURRENT_PROPERTY_SOURCEprivate java.util.Set<PropertySource>sources
-
Constructor Summary
Constructors Modifier Constructor Description privateEnvironment(PropertySource propertySource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidaddPropertySource(PropertySource propertySource)private booleancontainsKey(java.lang.String key)private java.lang.Stringget(java.lang.String key)private voidremovePropertySource(PropertySource propertySource)private booleansourceContainsProperty(PropertySource source, java.lang.String key)private java.lang.StringsourceGetProperty(PropertySource source, java.lang.String key)
-
-
-
Field Detail
-
sources
private final java.util.Set<PropertySource> sources
-
CURRENT_PROPERTY_SOURCE
private final java.lang.ThreadLocal<PropertySource> CURRENT_PROPERTY_SOURCE
-
-
Constructor Detail
-
Environment
private Environment(PropertySource propertySource)
-
-
Method Detail
-
addPropertySource
private void addPropertySource(PropertySource propertySource)
-
removePropertySource
private void removePropertySource(PropertySource propertySource)
-
get
private java.lang.String get(java.lang.String key)
-
sourceContainsProperty
private boolean sourceContainsProperty(PropertySource source, java.lang.String key)
-
sourceGetProperty
private java.lang.String sourceGetProperty(PropertySource source, java.lang.String key)
-
containsKey
private boolean containsKey(java.lang.String key)
-
-