New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It's now possible to adjust the tag generation if the Timber is wrapped into another logger framework #37
Conversation
…ed into another logger framework
So how about merging that one? :) |
API-wise this change is very awkward. I do not like it as is. I'm leaving it open for discussion and to remind me to try to think of something a bit more elegant. |
The whole case with getting the sixth stack trace element and using it for logging is a little bit strange, but as far as I know this is the best way to print the logging context and I think that my change is a good move to make Timber customizable for the use case mentioned in the description. |
@JakeWharton can You elaborate more on what You mean by 'API-wise'? Did You mean that methods are public and package-scope visible? |
Yes. And that it's just a magic number that you have to return. On Tue Jan 20 2015 at 6:55:12 AM Christopher Kocel notifications@github.com
|
So how about doing it this way?
|
Or pass it a list of packages/classes to skip? |
That is a much more appropriate solution. Maybe it's a callback with a
|
Or pass the Throwable to a callback that returns a String? Then the user can implement it however they like (walk trace a fixed number of steps, base on package, ..). |
Nice. I like that. On Wed Jan 21 2015 at 2:30:36 AM Simon Vig Therkildsen <
|
Let's image that we don't want to use Timber directly in our applications, but we have a custom interface for logging that use a Timber delegate as its implementation. Let's call that interface "Logger". So in the debug log we want to print the line when Logger.d() was called, not Timber.d() (we already know this line, it's always inside our "Logger").
The aim of this change is to make possible to customize which line from the calling stack trace should be printed by the DebugTree.