How jakewharton/timber works
Timber is an extensible Android logging library: an application installs Trees, then sends log calls through Timber’s facade for dispatch and destination-specific handling. On Android, DebugTree infers tags and writes messages to Android Log. The separate lint module registers detectors for common Timber usage and formatting mistakes. The Android implementation and detector excerpts are partial, so the graph omits uncertain internal wiring; lint capabilities are based on the README and registry.
Main entry points: log/Timber.kt Timber facade · log/Timber.kt Custom Tree · TimberIssueRegistry.kt Issue registry · WrongTimberUsageDetector.kt Usage detector
Components 9
Logging runtime
- Timber facade
timber/src/androidMain/kotlin/timber/log/Timber.kt - Custom Tree
timber/src/commonMain/kotlin/timber/log/Timber.kt - DebugTree
timber/src/androidMain/kotlin/timber/log/Timber.kt - Prepare log
timber/src/androidMain/kotlin/timber/log/Timber.kt
Lint analysis
- Issue registry
timber-lint/src/main/java/timber/lint/TimberIssueRegistry.kt - Usage detector
timber-lint/src/main/java/timber/lint/WrongTimberUsageDetector.kt
Other components
- Application
- Android Log
- Android lint
Connections 8
- Application → Timber facade: installs Trees
- Application → Timber facade: sends log calls
- Timber facade → Custom Tree: dispatches calls
- Custom Tree → Prepare log: prepares messages
- DebugTree → Prepare log: inherits handling
- DebugTree → Android Log: writes messages
- Android lint → Issue registry: loads issues
- Issue registry → Usage detector: provides issues