Reputation: 13349
I am working on an Android Application where I need to display log information when I execute the .apk file in release mode based on some condition. It can be like below:
if(debug)
display log inf.
else
normal execution
I will set this variable to true to enable debug mode to display log information. Can anyone help me in achieving this feature.
Thanks In Advance.
Upvotes: 1
Views: 1675
Reputation: 2296
Why don't you use the Log-function of Android via
Log.v(YourClass.class.simpleName(), "this is your verbose log text");
If you connect your phone to your computer and install the apk-file on your mobile phone (via Eclipse) you can use the phone like the emulator and watch the log entries in the DDMS.
See also: http://developer.android.com/guide/developing/tools/ddms.html, http://developer.android.com/reference/android/util/Log.html
Upvotes: 3