You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to write a lazy wrapper around Timber so that it doesn't construct the final log string unless things are actually going to get logged.
class DefaultLazyTimberTree(private val delegate: Timber.Tree): LazyTimberTree {
override fun d(message: () -> String?) {
if (delegate.isLoggable(Log.DEBUG)) {
delegate.d(message())
}
}
}
The issue here is that "isLoggable" is not a public function, so you can't inspect the tree/forest to decide if you need to call the lambda function or not.
The text was updated successfully, but these errors were encountered:
I'm trying to write a lazy wrapper around Timber so that it doesn't construct the final log string unless things are actually going to get logged.
The issue here is that "isLoggable" is not a public function, so you can't inspect the tree/forest to decide if you need to call the lambda function or not.
The text was updated successfully, but these errors were encountered: