Package org.apache.logging.log4j.status
Class StatusLogger.PropertiesUtilsDouble
java.lang.Object
org.apache.logging.log4j.status.StatusLogger.PropertiesUtilsDouble
- Enclosing class:
StatusLogger
This is a thin double of
PropertiesUtil.
We could have used PropertiesUtil, PropertyFilePropertySource, etc.
Consequently, they would delegate to LoaderUtil, etc.
All these mechanisms expect a working StatusLogger.
In order to be self-sufficient, we cannot rely on them, hence this double.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanisRelevantPropertyName(@Nullable Object propertyName) Filter to exclude irrelevant property names (i.e., non-string and notlog4j-prefixed) to speed up matching.normalizeProperties(Properties... propertiesList) private static StringnormalizePropertyName(String propertyName) An imperfect property name normalization routine.private static Properties(package private) static PropertiesreadPropertiesFile(String propertiesFileName) (package private) static @Nullable StringreadProperty(Map<String, Object> normalizedProperties, String propertyName)
-
Constructor Details
-
PropertiesUtilsDouble
PropertiesUtilsDouble()
-
-
Method Details
-
readProperty
-
readAllAvailableProperties
-
readEnvironmentProperties
-
readPropertiesFile
-
normalizeProperties
-
isRelevantPropertyName
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
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
-