Thursday, 8 September 2011

Logging for Android Debugging

Methods of logging
- ERROR: Log.e()
- WARN: Log.w()
- Info: Log.i()
- DEBUG: Log.d()
- VERBOSE: Log.v()

How to:
1. Add a TAG as a class member like this.
    private static final String TAG = "MyClass";
2. Where you want to log, put line like this.
    Log.e(TAG, "value=" + i);

No comments:

Post a Comment