Is it a bad idea to use printStackTrace() in Android Exceptions?
up vote 35 down vote favorite 7 | Is it a bad idea to use printStackTrace() in Android Exceptions like this?
java android exception printstacktrace |
| add a comment |
Oct 4 '10 at 12:26 4,135 29 87 159 |
5 Answers
up vote 22 down vote accepted | Yes, it is a bad idea. You should instead use Android's built-in log class specifically designed for these purposes: http://developer.android.com/reference/android/util/Log.html It gives you options to log debug messages, warnings, errors etc. |
| add a comment |
Oct 4 '10 at 13:28 10.9k 10 54 84 |
up vote 26 down vote | I believe this is what you need:
|
|
132k 34 214 315 | Oct 25 '11 at 17:12 279 3 3 |