On Tue, 7 Mar 2023 10:16:24 GMT, Daniel Fuchs <[email protected]> wrote:

> The HttpClient internal DebugLogger could be simplified if its configuration 
> was held in a record. Some of the methods in Utils that return a debug logger 
> could also be simplified/removed. The system property that configures the 
> debug logging could be extended to choose between System.err, System.out, 
> System.Logger, or any of these configurations.
> Passing -Djdk.internal.httpclient.debug=true still works as before.

test/jdk/java/net/httpclient/DebugLoggerTest.java line 247:

> 245:         julLogger.setLevel(Level.ALL);
> 246:         julLogger.setUseParentHandlers(false);
> 247:         julLogger.addHandler(logHandler);

Given our previous experience where a `j.u.l.Logger` getting garbage collected 
would result in odd failures in tests, do you think we should keep reference to 
this `julLogger` till the end of the test? Right now, I don't see this 
reference being used after this line.

-------------

PR: https://git.openjdk.org/jdk/pull/12900

Reply via email to