Record Class CoreProperties.ConfigurationProperties
java.lang.Object
java.lang.Record
org.apache.logging.log4j.core.impl.CoreProperties.ConfigurationProperties
- Record Components:
allowedProtocols
- The protocols allowed for the configuration location.clock
- A customClock
implementation to use to timestamp log events. The supported values are:SystemMillisClock
CachedClock
CoarseCachedClock
If
null
, the system clock will be used.factory
- TheConfigurationFactory
to use ornull
for the default one.level
- The default level of the root logger.location
- The location (file path orURI
) of the configuration file. Ifnull
a standard set of locations is used.mergeStrategy
- TheMergeStrategy
to use if multiple configuration files are present.reliabilityStrategy
- TheReliabilityStrategy
to use during the reconfiguration process.usePreciseClock
- Iftrue
a clock with nanosecond precision will be used whenever available.waitMillisBeforeStopOldConfig
- The number of milliseconds to wait for the old configuration to stop.
- Enclosing class:
- CoreProperties
@Log4jProperty(name="configuration")
public static record CoreProperties.ConfigurationProperties(String allowedProtocols, @Nullable String clock, @Nullable Class<? extends ConfigurationFactory> factory, org.apache.logging.log4j.Level level, @Nullable String location, @Nullable Class<? extends MergeStrategy> mergeStrategy, String reliabilityStrategy, boolean usePreciseClock, long waitMillisBeforeStopOldConfig)
extends Record
Properties related to the retrieval of a configuration.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigurationProperties
(String allowedProtocols, @Nullable String clock, @Nullable Class<? extends ConfigurationFactory> factory, org.apache.logging.log4j.Level level, @Nullable String location, @Nullable Class<? extends MergeStrategy> mergeStrategy, String reliabilityStrategy, boolean usePreciseClock, long waitMillisBeforeStopOldConfig) Creates an instance of aConfigurationProperties
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedProtocols
record component.@Nullable String
clock()
Returns the value of theclock
record component.final boolean
Indicates whether some other object is "equal to" this one.@Nullable Class<? extends ConfigurationFactory>
factory()
Returns the value of thefactory
record component.final int
hashCode()
Returns a hash code value for this object.org.apache.logging.log4j.Level
level()
Returns the value of thelevel
record component.@Nullable String
location()
Returns the value of thelocation
record component.@Nullable Class<? extends MergeStrategy>
Returns the value of themergeStrategy
record component.Returns the value of thereliabilityStrategy
record component.final String
toString()
Returns a string representation of this record class.boolean
Returns the value of theusePreciseClock
record component.long
Returns the value of thewaitMillisBeforeStopOldConfig
record component.
-
Constructor Details
-
ConfigurationProperties
public ConfigurationProperties(@Log4jProperty(defaultValue="file,https,jar") String allowedProtocols, @Nullable String clock, @Nullable Class<? extends ConfigurationFactory> factory, @Log4jProperty(defaultValue="ERROR") org.apache.logging.log4j.Level level, @Nullable String location, @Nullable Class<? extends MergeStrategy> mergeStrategy, @Log4jProperty(defaultValue="AwaitCompletion") String reliabilityStrategy, boolean usePreciseClock, @Log4jProperty(defaultValue="5000") long waitMillisBeforeStopOldConfig) Creates an instance of aConfigurationProperties
record class.- Parameters:
allowedProtocols
- the value for theallowedProtocols
record componentclock
- the value for theclock
record componentfactory
- the value for thefactory
record componentlevel
- the value for thelevel
record componentlocation
- the value for thelocation
record componentmergeStrategy
- the value for themergeStrategy
record componentreliabilityStrategy
- the value for thereliabilityStrategy
record componentusePreciseClock
- the value for theusePreciseClock
record componentwaitMillisBeforeStopOldConfig
- the value for thewaitMillisBeforeStopOldConfig
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
allowedProtocols
Returns the value of theallowedProtocols
record component.- Returns:
- the value of the
allowedProtocols
record component
-
clock
Returns the value of theclock
record component.- Returns:
- the value of the
clock
record component
-
factory
Returns the value of thefactory
record component.- Returns:
- the value of the
factory
record component
-
level
public org.apache.logging.log4j.Level level()Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-
location
Returns the value of thelocation
record component.- Returns:
- the value of the
location
record component
-
mergeStrategy
Returns the value of themergeStrategy
record component.- Returns:
- the value of the
mergeStrategy
record component
-
reliabilityStrategy
Returns the value of thereliabilityStrategy
record component.- Returns:
- the value of the
reliabilityStrategy
record component
-
usePreciseClock
public boolean usePreciseClock()Returns the value of theusePreciseClock
record component.- Returns:
- the value of the
usePreciseClock
record component
-
waitMillisBeforeStopOldConfig
public long waitMillisBeforeStopOldConfig()Returns the value of thewaitMillisBeforeStopOldConfig
record component.- Returns:
- the value of the
waitMillisBeforeStopOldConfig
record component
-