Package org.apache.logging.log4j.util
Class PropertiesUtil.Environment
- java.lang.Object
-
- org.apache.logging.log4j.util.PropertiesUtil.Environment
-
- Enclosing class:
- PropertiesUtil
private static class PropertiesUtil.Environment extends java.lang.Object
Provides 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.util.Map<java.lang.CharSequence,java.lang.String>
literal
private java.util.Map<java.lang.CharSequence,java.lang.String>
normalized
private java.util.Set<PropertySource>
sources
private java.util.Map<java.util.List<java.lang.CharSequence>,java.lang.String>
tokenized
-
Constructor Summary
Constructors Modifier Constructor Description private
Environment(PropertySource propertySource)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
containsKey(java.lang.String key)
private java.lang.String
get(java.lang.String key)
private static boolean
hasSystemProperty(java.lang.String key)
private void
reload()
-
-
-
Field Detail
-
sources
private final java.util.Set<PropertySource> sources
-
literal
private final java.util.Map<java.lang.CharSequence,java.lang.String> literal
-
normalized
private final java.util.Map<java.lang.CharSequence,java.lang.String> normalized
-
tokenized
private final java.util.Map<java.util.List<java.lang.CharSequence>,java.lang.String> tokenized
-
-
Constructor Detail
-
Environment
private Environment(PropertySource propertySource)
-
-