I am about to release an app. Should I remove Log statements and e.printStackTrace() within the catch statements ?
I am about to release an app. Should I remove Log statements and e.printStackTrace()
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Logs are essential troubleshooting resources, even for deployed software.
I would limit logging for production releases (perhaps even limit it to “only log in emergencies”). But I would not categorically say “no logging”.
Here is a good discussion (with some good guidelines):
PS:
Having said that, I hasten to add:
No, you should not have any “debug” or “informational” logging in a production release.
Which is exactly what the Android documentation, cited in the above links, also says.