You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/03/08 16:41:27 UTC
[GitHub] [pulsar] merlimat commented on a change in pull request #9839: [Logging] Exclude unnecessary logging libraries
merlimat commented on a change in pull request #9839:
URL: https://github.com/apache/pulsar/pull/9839#discussion_r589571584
##########
File path: pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/internal/PulsarAdminImpl.java
##########
@@ -107,24 +106,6 @@
private final int requestTimeout;
private final TimeUnit requestTimeoutUnit;
- static {
- /**
- * The presence of slf4j-jdk14.jar, that is the jul binding for SLF4J, will force SLF4J calls to be delegated to
- * jul. On the other hand, the presence of jul-to-slf4j.jar, plus the installation of SLF4JBridgeHandler, by
- * invoking "SLF4JBridgeHandler.install()" will route jul records to SLF4J. Thus, if both jar are present
- * simultaneously (and SLF4JBridgeHandler is installed), slf4j calls will be delegated to jul and jul records
- * will be routed to SLF4J, resulting in an endless loop. We avoid this loop by detecting if slf4j-jdk14 is used
- * in the client class path. If slf4j-jdk14 is found, we don't use the slf4j bridge.
- */
- try {
- Class.forName("org.slf4j.impl.JDK14LoggerFactory");
- } catch (Exception ex) {
- // Setup the bridge for java.util.logging to SLF4J
- SLF4JBridgeHandler.removeHandlersForRootLogger();
- SLF4JBridgeHandler.install();
Review comment:
This was to route java.util.logging into SLF4J and it's due to the unfortunate fact that Jersey client is using JUL. If we remove it from here, I thing that Jersey logs will not be properly routed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org