Copilot commented on code in PR #8343:
URL: https://github.com/apache/hop/pull/8343#discussion_r3996689997
##########
ui/src/main/java/org/apache/hop/ui/hopgui/notifications/providers/NotificationHttp.java:
##########
@@ -30,6 +32,16 @@
/** Shared HTTP setup for the notification providers. */
final class NotificationHttp {
+ /**
+ * Retain a strong reference so LogManager does not garbage-collect the
configured log level.
+ * Suppresses verbose HTTP wire debugging from flooding console logs.
+ */
+ private static final Logger WIRE_LOGGER =
Logger.getLogger("org.apache.hc.client5.http.wire");
+
+ static {
+ WIRE_LOGGER.setLevel(Level.INFO);
Review Comment:
Apache HttpClient 5 emits `org.apache.hc.client5.http.wire` through SLF4J,
not `java.util.logging`, so changing this JUL logger does not affect the
`Wire.wire()` DEBUG records shown in the issue. The notification polling will
therefore continue to flood the logs; configure the active SLF4J
backend/category instead.
##########
ui/src/test/java/org/apache/hop/ui/hopgui/notifications/providers/NotificationHttpTest.java:
##########
@@ -135,4 +135,12 @@ public void testBoundedStreamCountsSingleByteReads()
throws Exception {
assertEquals(body.length, count);
}
}
+
+ @Test
+ public void testWireLoggingIsSuppressed() {
+ NotificationHttp.newClient();
+ java.util.logging.Logger wireLogger =
+ java.util.logging.Logger.getLogger("org.apache.hc.client5.http.wire");
+ assertEquals(java.util.logging.Level.INFO, wireLogger.getLevel());
Review Comment:
This test reads a `java.util.logging.Logger` with the same name, but
HttpClient 5 writes wire messages through SLF4J. It can pass while the actual
wire logger remains at DEBUG, so it does not verify the behavior reported by
the issue; test the active logging backend or capture an actual wire record.
--
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]