Disable creation of Log4J JMX beans in Gradle test conventions
sdavids opened this issue · comments
Would it make sense to disable the creation of Log4J JMX beans?
Steps to reproduce
⇓
systemProperty("java.util.logging.manager", "org.apache.logging.log4j.jul.LogManager")
systemProperty("log4j2.disableJmx", "true")
Context
To disable JMX completely, and prevent these MBeans from being created, specify system property
log4j2.disableJmx
to true when you start the Java VM.
https://logging.apache.org/log4j/2.x/manual/jmx.html#enabling-jmx
As long as we are not relying on their presence, it sounds reasonable to disable the JMX beans.
@marcphilipp and @sormuras, do you foresee any issue with disabling them?
No. Our tests don't rely on JMX to configure Log4J at runtime.
PR also looks good to me.