Class StatusLogger.Config
java.lang.Object
org.apache.logging.log4j.status.StatusLogger.Config
- Enclosing class:
StatusLogger
Holder for user-provided
StatusLogger configurations.- Since:
- 2.23.0
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int(package private) final boolean(package private) final @Nullable Levelprivate static final StatusLogger.Config(package private) final @Nullable DateTimeFormatter -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateConfig()Constructs the default instance using system properties and a property file (i.e., ) in the classpath, if available.Config(boolean debugEnabled, int bufferCapacity, @Nullable DateTimeFormatter instantFormatter) Constructs an instance using the given properties.privateThe lowest-level constructor.(package private)Config(Properties... propertiesList) A low-level constructor intended for tests. -
Method Summary
Modifier and TypeMethodDescriptionstatic StatusLogger.ConfigGets the static instance.private static intreadBufferCapacity(Map<String, Object> normalizedProperties) private static booleanreadDebugEnabled(Map<String, Object> normalizedProperties) private static LevelreadFallbackListenerLevel(Map<String, Object> normalizedProperties) private static @Nullable DateTimeFormatterreadInstantFormatter(Map<String, Object> normalizedProperties)
-
Field Details
-
INSTANCE
-
debugEnabled
final boolean debugEnabled -
bufferCapacity
final int bufferCapacity -
fallbackListenerLevel
-
instantFormatter
-
-
Constructor Details
-
Config
public Config(boolean debugEnabled, int bufferCapacity, @Nullable DateTimeFormatter instantFormatter) Constructs an instance using the given properties. Users should not create new instances, but usegetInstance()instead!- Parameters:
debugEnabled- the value of the "log4j2.debug" propertybufferCapacity- the value of the "log4j2.status.entries" propertyinstantFormatter- the value of the "log4j2.StatusLogger.dateFormat" property
-
Config
private Config()Constructs the default instance using system properties and a property file (i.e., ) in the classpath, if available. -
Config
Config(Properties... propertiesList) A low-level constructor intended for tests. -
Config
-
-
Method Details
-
getInstance
Gets the static instance.- Returns:
- a singleton instance
-
readDebugEnabled
-
readBufferCapacity
-
readFallbackListenerLevel
-
readInstantFormatter
private static @Nullable DateTimeFormatter readInstantFormatter(Map<String, Object> normalizedProperties)
-