Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change java logging console output from std err to std out?

Tags:

java

logging

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)?

like image 694
Obediah Stane Avatar asked Oct 11 '08 15:10

Obediah Stane


1 Answers

I've arrived at

 SimpleFormatter fmt = new SimpleFormatter();  StreamHandler sh = new StreamHandler(System.out, fmt);  logger.addHandler(sh); 
like image 162
Frank Vlach Avatar answered Sep 23 '22 04:09

Frank Vlach