-
Notifications
You must be signed in to change notification settings - Fork 954
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
isLoggable of individual Trees not entirely respected #324
Comments
There's not really a good way to handle this |
What we have inline fun Timber.log(priority: Int, throwable: Throwable? = null, message: () -> String) {
if (isLoggable(priority, null)) {
rawLog(priority, null, throwable, message())
}
} What should solve this inline fun Timber.log(priority: Int, throwable: Throwable? = null, message: () -> String) {
if (isLoggable(priority, null)) {
log(priority, null, throwable, message())
}
} We still get the message evaluated just once and each tree logs only if its own Which... well, What else did I miss? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(master branch)
The extension
Timber.log(Int, Throwable, () -> String)
method callsisLoggable()
which will be true when any of the installed Trees return true. It will then go on to call rawLog on all Trees, even those whereisLoggable()
returns true.For example
prints
The text was updated successfully, but these errors were encountered: