logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

feat: lock feature by properties(PropertiesPropertySource order in properties)

Open qxo opened this issue 3 years ago • 0 comments

so we can change the load order if we need: such as lock some properties for force disable some feature we don't need.

ie:

SystemPropertiesPropertySource is priority=100, if we want log4j2.component.properties lock some properties(such as log4j2.enableJndi) that we do not want to be changed by system properties or ENV. with this feature, log4j2.component.properties as below:

log4j2.enableJndiLookup=false
log4j2.propertiesLoadPriority=1000

Our app do not need jndi lookup feature, so we want force disable it(Can't enable by -Dlog4j2.enableJndiLookup=true or by ENV)

qxo avatar Dec 17 '21 11:12 qxo