How can I log the debug messages to a file when I session.setDebug(true)? - 10.10.00

Stefan Ritter



Don't how if it helps you, but I think it works.

1. Solution Start your program from a console with: java myProgramm >output.txt

Now all System.out's should by found in the file output.txt.

2. Solution You can also start your programm within the texteditor Textpad (www.textpad.com) and all the outputs are automatically in a new document which you can save to harddisk.

3. Solution Overwrite the OutputStream. Use something like System.setOut(PrintStream myFileOutputStream)