Java – How to change java logging console output from std err to std out


I'm using the standard ConsoleHandler from java.util.logging and by default the console output is directed to the error stream (i.e. System.err).

How do I change the console output to the output stream (i.e. System.out)?

Best Answer

I've arrived at

 SimpleFormatter fmt = new SimpleFormatter();
 StreamHandler sh = new StreamHandler(System.out, fmt);