Sign in to follow this  

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

This topic is 4397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

This topic is 4397 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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