abhiramaab commented on code in PR #8343:
URL: https://github.com/apache/hop/pull/8343#discussion_r3999892517


##########
engine/src/main/java/org/apache/hop/core/HopEnvironment.java:
##########
@@ -246,4 +248,28 @@ public static void reset() {
     HopClientEnvironment.reset();
     initialized.set(null);
   }
+
+  /**
+   * Silence noisy third-party loggers (such as Apache HttpClient 5 wire 
logging) by defaulting
+   * their level to INFO if not explicitly configured, preventing verbose byte 
dumping to console
+   * while preserving intentional debug flags. (Fixes #8340)
+   */
+  private static void silenceVerboseThirdPartyLoggers() {
+    try {
+      org.apache.logging.log4j.core.LoggerContext context =
+          org.apache.logging.log4j.core.LoggerContext.getContext(false);
+      org.apache.logging.log4j.core.config.Configuration configuration = 
context.getConfiguration();
+      String wireLoggerName = "org.apache.hc.client5.http.wire";
+      org.apache.logging.log4j.core.config.LoggerConfig loggerConfig =
+          configuration.getLoggerConfig(wireLoggerName);
+      boolean isExplicitlyConfigured =
+          wireLoggerName.equals(loggerConfig.getName()) && 
loggerConfig.getExplicitLevel() != null;
+      if (!isExplicitlyConfigured) {
+        org.apache.logging.log4j.core.config.Configurator.setLevel(

Review Comment:
   - Retained a static strong reference (`JUL_WIRE_LOGGER`) in `HopEnvironment` 
to prevent garbage collection by `LogManager`.
   - Defaults JUL wire logger to `Level.WARNING` if not already set, 
suppressing the console byte dumps coming from backends captured via JUL.
   - Retained the Log4j2 `getExplicitLevel()` check for environments that do 
bind SLF4J to Log4j2.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to