Timber is a logger with a small, extensible API which provides utility on top of Android's normal Log class. You can use this library and apply it into all the little apps you want to make. Behavior is added through Tree instances. You can install an instance by calling Timber.plant. Installation of Trees should be done as early as possible. The onCreate of your application is the most logical choice. The DebugTree implementation will automatically figure out from which class it's being called and use that class name as its tag. Since the tags vary, it works really well when coupled with a log reader like Pidcat. There are no Tree implementations installed by default. Timber ships with embedded lint rules to detect problems in your app. Timber detects the use of null or empty messages, or using the exception message when logging an exception.
Features
- Detects an incorrect number of arguments passed to a Timber call for the specified format string
- Detects arguments which are of the wrong type for the specified format string
- Detects the use of tags which are longer than Android's maximum length of 23
- Detects usages of Android's Log that should be using Timber
- Detects String.format used inside of a Timber call. Timber handles string formatting automatically
- Detects string concatenation inside of a Timber call