Reputation: 34497
I am trying to use anko
commons library for logging debug message on logcat. I want to display logging message in debug build not in signed build. I know I can remove logging in signed builds using Proguard
also.
I want to know if anko
library itself log messages only in case of debug build ? OR it does in signed build also ?
Here is the Logger
utility of anko
library https://github.com/Kotlin/anko/blob/d5a526512b48c5cd2e3b8f6ff14b153c2337aa22/anko/library/static/commons/src/Logging.kt
/**
* Send a log message with the [Log.DEBUG] severity.
* Note that the log message will not be written if the current log level is above [Log.DEBUG].
* The default log level is [Log.INFO].
*
* @param message the function that returns message text to log.
* `null` value will be represent as "null", for any other value the [Any.toString] will be invoked.
*
* @see [Log.d].
*/
inline fun AnkoLogger.debug(message: () -> Any?) {
val tag = loggerTag
if (Log.isLoggable(tag, Log.DEBUG)) {
Log.d(tag, message()?.toString() ?: "null")
}
}
Do I need to remove logging using proguard ? or using some BuildConfig.kt
or anko
library manages itself ?
Upvotes: 0
Views: 476