Sign in to follow this  
FatNewbie

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

Recommended Posts

FatNewbie    122
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

Share this post


Link to post
Share on other sites
nmi    978
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).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this