In my code base is the (very simplified) following:
public static void main (String[] args) { System.out.println(\"Starting application\"); try {
Call e.printStackTrace(System.out);. Or, if you need it for debugging only, you can separate the process' output and error from the command line: .... 1>output.log 2>error.log
e.printStackTrace(System.out);
.... 1>output.log 2>error.log