When an app is compiled, what is the minimum priority which is packaged in the APK? The documentation for android.util.Log states that
Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.
Does this imply that different levels of verbosity are handled differently at compile-time and at runtime? What is this different handling? Furthermore, is Log.d() preferred over Log.v() for general “somemethod() called.” messages and why?
When it says “Verbose should never be compiled into an application except during development,” that means you, the developer, should take them out prior to release, not that the compiler will throw them out.
The normal way I ensure my logs don’t make it to release is with a helper function:
It relieves me of typing the tag name/variable every time, and all I have to do to remove them all is change one static variable in code,
isRelease.