-
Notifications
You must be signed in to change notification settings - Fork 40.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide option to re-enable log4j2 JMX support when they disable it by default #40273
Comments
I think we might want to do something here, but I'm not sure we should tie things with I wonder if we should wait to see how apache/logging-log4j2#1229 plays out. If Log4J flip the default then we might be able to provide a quick way to turn it back on for users that need it. |
Log4j2 has flipped the default so we can consider an option to flip it back as and when we upgrade to a version with the change. That said, I learned from apache/logging-log4j2#2468 (review) that Log4j 3.0 won't have any JMX support at all so I wonder if this is really worth it. The |
I suggest having no code changes but a documentation improvement. https://docs.spring.io/spring-boot/reference/actuator/jmx.html Add something along the lines of: [NOTE]
====
`spring.jmx.enabled` affects only the management beans provided by Spring.
The enablement of management beans provided by other frameworks, e.g. https://logging.apache.org/log4j/2.x/manual/jmx.html[Log4j2], https://www.quartz-scheduler.org/api/2.3.0/constant-values.html#org.quartz.impl.StdSchedulerFactory.PROP_SCHED_JMX_EXPORT[Quartz], or https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/appendices/Configurations.html#configurations-jmx[Hibernate], is independent.
====
⇓
|
I think it would make sense for a Spring Application to use There are not many users that use Log4j JMX, there are probably even less users that enable JMX in Log4j, but not in Spring Boot, so it might even be safe to do it in a patch release. |
https://github.com/apache/logging-log4j2/releases/tag/rel%2F2.24.0
|
We discussed this today and given that JMX support will be dropped in Log4j 3.0 we don't think we should add support directly in Spring Boot. We want to keep |
What about the documentation change? It would underscore your statement:
|
https://logging.apache.org/log4j/2.x/manual/jmx.html#enabling-jmx
Related
Spring Boot - Disable JMX by default
JUnit 5 - Disable Log4J JMX beans creation in tests
Ideally the auto-configuration would set
log4j2.disableJmx=true
ifspring.jmx.enabled=false
thereby no log4j2 JMX beans would be created.Alternatively, the
log4j2.disableJmx
property should be mentioned in at least these two places:The text was updated successfully, but these errors were encountered: