A small, extensible logger on top of Android's Log class
open sourceApache-2.0free
Timber is a logging library for Android that adds a small, extensible API on top of Android's normal Log class. Behaviour comes from Tree instances you plant at startup: the bundled DebugTree tags each message with the calling class automatically, and none is installed by default so nothing is logged in release builds unless you plant a tree. It ships lint rules that catch wrong format arguments, over-long tags, string concatenation in log calls and plain Log calls that should use Timber.
Problems it solves
- stop sprinkling Android Log calls with hand-written tags all over my app
- turn off debug logging in my Android release build without deleting log lines
- catch wrong format arguments in my Android log calls before they ship
Features
- pluggable Tree instances decide where logs go
- automatic tags from the calling class (DebugTree)
- printf-style message formatting
- bundled lint checks for log calls
Alternatives
The same job
These do what Timber does.
- Logger (Android) Readable, structured logs for Android in Logcat