JakeWharton / JakeWharton/timber
Feature request: expose the `excludeList`/`tag` to subclasses
- Dominant language
- Kotlin
- Stars
- 10.8k
- Forks
- 994
- Avg merge
- 17h 16m
- Merged PRs (30d)
- 17
Description
It would be nice if we could control which classes to exclude from the stack-trace. Some times this might be handy, think about some helper class/custom logger implementation, which wraps the calls to the actual log functions `d/i/w/e`, in such cases I would like to have a `StackTraceElement` that is one layer above the current wrapping call. This might be useful in general, especially if you instantiate "Proxy" objects that do some kind of logging inside.
Maybe `DebugTree.fqcnIgnore` could be made `protected` (or helper methods could be added), or `tag` might be made `protected` instead of `internal`, guaranteeing a complete control over how the `tag` is created, in such a way custom classes might create their own custom logic for how a `tag` is created/how the stack-trace is iterated over.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading DebugTree.fqcnIgnore and the tag implementation, then trace how the d/i/w/e logging calls select StackTraceElement values. Define an extension point that lets subclasses control excluded classes or tag creation, and verify that custom subclasses can change both behaviors without affecting existing logging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100