If you lookup the logging documentation on Android Dev you there is a section which reads
The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. 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.
The second part of this blurb is what is currently confusing me. Does that mean that
a) The compilers optimizer automatically strips out all verbose logging (like it is suggested specifically doesn't in debug)
or
b) That I should before release find and replace all Log.v() with ""
I realise that verbose logging is not desirable to end users, which I completely agree with, but I also believe during development logs should be utilized as much as possible. I realise I could in theory do something along the lines of
if(IS_VERBOOSE_LOGGING_ENABLED)
{
Log.v("My log message here");
}
However this still would violate the suggestion (assuming that it mean to strip out before compile time).
Any clarifications form the community would be greatly appreciated.
The best thing to do it to just configure proguard to get rid of all the logging in your release artifact. Then you don't need to worry at all.
# get rid of all the logging
-assumenosideeffects class android.util.Log {
public static int v(...);
public static int d(...);
public static int w(...);
public static int i(...);
}