Package org.apache.logging.log4j.status
Class StatusLogger.PropertiesUtilsDouble
- java.lang.Object
-
- org.apache.logging.log4j.status.StatusLogger.PropertiesUtilsDouble
-
- Enclosing class:
- StatusLogger
static final class StatusLogger.PropertiesUtilsDouble extends java.lang.ObjectThis is a thin double ofPropertiesUtil.We could have used
PropertiesUtil,PropertyFilePropertySource, etc. Consequently, they would delegate toLoaderUtil, etc. All these mechanisms expect a workingStatusLogger. In order to be self-sufficient, we cannot rely on them, hence this double.
-
-
Constructor Summary
Constructors Constructor Description PropertiesUtilsDouble()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static booleanisRelevantPropertyName(@Nullable java.lang.Object propertyName)Filter to exclude irrelevant property names (i.e., non-string and notlog4j-prefixed) to speed up matching.private static java.util.Map<java.lang.String,java.lang.Object>normalizeProperties(java.util.Properties... propertiesList)private static java.lang.StringnormalizePropertyName(java.lang.String propertyName)An imperfect property name normalization routine.(package private) static java.util.Map<java.lang.String,java.lang.Object>readAllAvailableProperties()private static java.util.PropertiesreadEnvironmentProperties()(package private) static java.util.PropertiesreadPropertiesFile(java.lang.String propertiesFileName)(package private) static @Nullable java.lang.StringreadProperty(java.util.Map<java.lang.String,java.lang.Object> normalizedProperties, java.lang.String propertyName)
-
-
-
Method Detail
-
readProperty
static @Nullable java.lang.String readProperty(java.util.Map<java.lang.String,java.lang.Object> normalizedProperties, java.lang.String propertyName)
-
readAllAvailableProperties
static java.util.Map<java.lang.String,java.lang.Object> readAllAvailableProperties()
-
readEnvironmentProperties
private static java.util.Properties readEnvironmentProperties()
-
readPropertiesFile
static java.util.Properties readPropertiesFile(java.lang.String propertiesFileName)
-
normalizeProperties
private static java.util.Map<java.lang.String,java.lang.Object> normalizeProperties(java.util.Properties... propertiesList)
-
isRelevantPropertyName
private static boolean isRelevantPropertyName(@Nullable java.lang.Object propertyName)
Filter to exclude irrelevant property names (i.e., non-string and notlog4j-prefixed) to speed up matching.- Parameters:
propertyName- a property name- Returns:
true, if the property name is relevant;false, otherwise
-
normalizePropertyName
private static java.lang.String normalizePropertyName(java.lang.String propertyName)
An imperfect property name normalization routine.It is imperfect, because
foo.barwould match withfo.obar. But it is good enough for theStatusLoggerneeds.- Parameters:
propertyName- the input property name- Returns:
- the normalized property name
-
-