You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "ppkarwasz (via GitHub)" <gi...@apache.org> on 2024/01/22 22:19:19 UTC
[PR] Remove JMX support (logging-log4j2)
ppkarwasz opened a new pull request, #2228:
URL: https://github.com/apache/logging-log4j2/pull/2228
As partial solution to #1344, this PR drop JMX support and replaces the usage of `RingBufferAdmin` in tests with a direct access to the `RingBuffer`.
## Motivation
JMX is an old monitoring technology, which less and less used today. Given its inherent insecurity, we should evaluate if JMX support should even be part of Log4j Core.
Our JMX support code is the main obstacle to the separation of `AsyncLogger` and related code into its own artifact.
IMHO we should drop JMX support in 3.0.x and evaluate if such a technology should be added again in 3.1.x.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove JMX support (logging-log4j2)
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz merged PR #2228:
URL: https://github.com/apache/logging-log4j2/pull/2228
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove JMX support (logging-log4j2)
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on code in PR #2228:
URL: https://github.com/apache/logging-log4j2/pull/2228#discussion_r1463254211
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java:
##########
@@ -436,13 +435,7 @@ public boolean stop(final long timeout, final TimeUnit timeUnit) {
}
this.setStopping();
- String name = getName();
- try {
- Server.unregisterLoggerContext(name); // LOG4J2-406, LOG4J2-500
- } catch (final LinkageError | Exception e) {
- // LOG4J2-1506 Hello Android, GAE
- LOGGER.error("Unable to unregister MBeans", e);
- }
+
Review Comment:
I am not sure I understand: I removed the `Server` class and method call, so the `try ... catch` becomes empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove JMX support (logging-log4j2)
Posted by "ppkarwasz (via GitHub)" <gi...@apache.org>.
ppkarwasz commented on PR #2228:
URL: https://github.com/apache/logging-log4j2/pull/2228#issuecomment-1906233393
Part of #2163
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove JMX support (logging-log4j2)
Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on code in PR #2228:
URL: https://github.com/apache/logging-log4j2/pull/2228#discussion_r1463329846
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java:
##########
@@ -436,13 +435,7 @@ public boolean stop(final long timeout, final TimeUnit timeUnit) {
}
this.setStopping();
- String name = getName();
- try {
- Server.unregisterLoggerContext(name); // LOG4J2-406, LOG4J2-500
- } catch (final LinkageError | Exception e) {
- // LOG4J2-1506 Hello Android, GAE
- LOGGER.error("Unable to unregister MBeans", e);
- }
+
Review Comment:
Oh! :facepalm: Got it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Remove JMX support (logging-log4j2)
Posted by "vy (via GitHub)" <gi...@apache.org>.
vy commented on code in PR #2228:
URL: https://github.com/apache/logging-log4j2/pull/2228#discussion_r1463058033
##########
log4j-core/src/main/java/org/apache/logging/log4j/core/LoggerContext.java:
##########
@@ -436,13 +435,7 @@ public boolean stop(final long timeout, final TimeUnit timeUnit) {
}
this.setStopping();
- String name = getName();
- try {
- Server.unregisterLoggerContext(name); // LOG4J2-406, LOG4J2-500
- } catch (final LinkageError | Exception e) {
- // LOG4J2-1506 Hello Android, GAE
- LOGGER.error("Unable to unregister MBeans", e);
- }
+
Review Comment:
Why did we remove this and another below Android-specific guards?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org