Writing Log Records to Standard Error

To make a logger print log records on standard error, you need to add a ConsoleHandler to the logger.
// Create a console handler ConsoleHandler handler = new ConsoleHandler(); // Add to logger Logger logger = Logger.getLogger("com.mycompany"); logger.addHandler(handler);

Post a comment

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image. Ignore spaces and be careful about upper and lower case.