

You should try not to flood the most important log levels. Timber is a popular library which will allow you to do exactly that. This will allow you to easily disable the logs in production build, redirect them to another output, or decorate the lines if needed. Of course you can use the built-in Log class and its convenient static methods, ++code>d(),e(),i()++/code> ?Īn option is to create your own wrapper for this class and inject it into your classes. Here are some tips to do better logging on your Android App. I suggest that logs can be useful on a daily basis if done correctly. You write tons of throwaway log lines such as ++code>"being here"++/code>, ++code>"user=23939"++/code>, etc? and delete everything as soon as you understood the root cause of the bug.

Logging can sometimes be seen as the tool to be used as a last resort.
