On Tue, 10 Mar 2026 19:06:21 GMT, Daniel Fuchs <[email protected]> wrote:

>> Hello Daniel, `ConsoleHandler` doesn't have a (public) method to set the 
>> output stream (i.e. there's no setOutputStream(...)). I decided it wasn't 
>> worth it to create a subclass of ConsoleHandler in these tests just to 
>> override and use System.out. As far as I can see these log messages are 
>> merely for debugging.
>> 
>> Do you suggest I create a custom subclass of ConsoleHandler in these tests?
>
> Argh. darn. the method is `protected` - I thought it was `public`. Unless any 
> of these tests attempt to process System.out then I guess having the debug on 
> System.err should work as well. Forget those suggestions. If we needed to 
> keep System.out then:
> 
> new StreamHandler(System.out, new SimpleFormatter()) {
>     public void publish(LogRecord record) {
>         super.publish(record);
>         flush();
>     }
>  }
>  ```
>  would be simpler.

Hello Daniel, I had another look at these tests and verified that they don't do 
any processing of the log messages itself. I'll go ahead with the current state 
of the PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30158#discussion_r2915872894

Reply via email to