Pryo
Pryo

Reputation: 690

Programmatic access to the Java console log

Is it possible to, and if so how do you get programmatic access to the Java Console Log generated by Java applets?

What I want to do is add a "post bug" button to the applet I am developing. When testers click this button I would like the applet to then package up the contents of the console log as part of a bug report submitted by the applet.

Thanks for any help.

Upvotes: 0

Views: 593

Answers (2)

Garrett Hall
Garrett Hall

Reputation: 30042

Using System.setOut and setErr you can capture output that would otherwise go to the console.

Upvotes: 1

Saurabh Saxena
Saurabh Saxena

Reputation: 1407

You can append log messages to a StringBuffer object, and show in Textfield on the click of a button.

Upvotes: 1

Related Questions