Quantcast
Viewing all articles
Browse latest Browse all 32

Answer by user462990 for How to remove all debug logging calls before building the release version of an Android app?

I like to use Log.d(TAG, some string, often a String.format ()).

TAG is always the class name

Transform Log.d(TAG, --> Logd( in the text of your class

private void Logd(String str){
    if (MainClass.debug) Log.d(className, str);
}

In this way when you are ready to make a release version, set MainClass.debug to false!


Viewing all articles
Browse latest Browse all 32

Trending Articles