I’m not against optimizing the Timber code away. The only concern is the potential issue that Google is warning as below. I have never got issue before, but it’s a clear warning from Google.

Adding optimization introduces# certain risks, since for example not all optimizations performed by# ProGuard works on all versions of Dalvik.  The following flags turn# off various optimizations known to have issues, but the list may not# be complete or up to date. (The "arithmetic" optimization can be# used if you are only targeting Android 2.0 or later.)  Make sure you# test thoroughly if you go this route

The other option is, write your own wrapper class for your debug messsage. That would would be sure to strip it out clearly as you wish for release messages, where by the debug message only shown in the debug build flavor.

Written by

Passionate about learning, and sharing mobile development and others https://twitter.com/elye_project https://www.facebook.com/elye.proj

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store