Any easy and fast way to turn of System.out.println.. in java

Started by
2 comments, last by FatNewbie 18 years, 5 months ago
Hello wonderful people fo game dev, I was wondering whether there was a simple and easy way to turn of the function System.out.println in JAVA, because i use alot of this for debugging, but it is annoying when i want to do a performance check as there is alot of it, is there any way short of commenting it all out that is a fast way to make ti not take any processing power by not actually running/compiling with it. Ok thank you for your time :D
Advertisement
For debugging messages use java.lang.System.err instead.

With System.setErr() you can redirect it to something else (i.e. a file) or turn it off (if redirected to a null-device).
wow thanks, i'll try that (oh , this is when i learn to be thankful for the find and replace function!)
ah good it works, thanks :D

This topic is closed to new replies.

Advertisement