A memory leak detection library for Android that automatically reports leaked objects during debug builds.
JakeWharton/timber
A small, extensible logging library for Android that wraps the platform Log class with pluggable Tree backends.
- Stars
- 10,852
- Forks
- 994
- Open issues
- 63
- Last commit
- 3 days ago
What is it?
Timber is a logging library for Android that sits on top of the platform's android.util.Log class. Instead of calling Log directly with a manual tag each time, you call static Timber methods, and behavior is determined by the Tree instances you install at startup.
The bundled DebugTree automatically uses the calling class name as the log tag, which makes logs easy to filter with tools such as Pidcat. No Tree is installed by default, so production logging behavior is entirely under the app's control. Developers can write custom Tree implementations to route messages to crash reporting or other destinations.
Timber also ships embedded Android Lint rules that flag argument count and type mismatches in format strings, overly long tags, direct use of Log instead of Timber, and redundant exception message logging.
Key features
- 01Routes logs through pluggable Tree instances installed at app startup.
- 02DebugTree uses the calling class name as the log tag automatically.
- 03Includes no default Tree, leaving production logging to the app.
- 04Provides embedded Lint rules for format arguments, tag length and Log usage.
Use cases
- Replacing scattered android.util.Log calls with a consistent logging API in an Android app.
- Sending logs from a production build to a crash reporting service through a custom Tree.
- Filtering debug logs by class name with Pidcat or similar tools.
Quick start
- 1
Add the Timber dependency from the README to your Gradle build
- 2
Install a Tree in your application's onCreate, then call Timber's static methods
Things to know
- Built for Android only, on top of the platform Log class.
- No Tree is installed by default, so you must plant one yourself or nothing is logged.
In collections
Topics
FAQ
- What is timber?
- A small, extensible logging library for Android that wraps the platform Log class with pluggable Tree backends. Timber is a logging library for Android that sits on top of the platform's android.util.Log class. Instead of calling Log directly with a manual tag each time, you call static Timber methods, and behavior is determined by the Tree instances you install at startup.
- Is timber free to use? What license does it have?
- timber is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is timber still maintained?
- Actively maintained. The last commit to timber was on Nov 4, 2026.
- What can I use timber for?
- Replacing scattered android.util.Log calls with a consistent logging API in an Android app. Sending logs from a production build to a crash reporting service through a custom Tree. Filtering debug logs by class name with Pidcat or similar tools.
- How do I install timber?
- Add the Timber dependency from the README to your Gradle build Install a Tree in your application's onCreate, then call Timber's static methods
- Where can I get timber?
- The source code and installation instructions are on GitHub: https://github.com/JakeWharton/timber
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Python logging library that replaces the standard logging setup with a single logger, file rotation, colored output and structured logs.
A tiny JavaScript debugging utility that prints namespaced debug output in Node.js and web browsers, toggled via the DEBUG environment variable.
A Python debugging helper where ic() replaces print() by showing variable names, expressions, and their values with pretty-printed, syntax-highlighted output.
A low-overhead Python tracer that records function calls and visualizes code execution as an interactive timeline.
A PHP development tool that shows request data, queries, logs, timelines and more in your browser, mainly for Laravel apps.