JakeWharton / timber

A logger with a small, extensible API which provides utility on top of Android's normal Log class.
https://jakewharton.github.io/timber/docs/5.x/
Apache License 2.0
10.46k stars 962 forks source link

Method reference does not work anymore en 5.x #445

Closed TimoPtr closed 3 years ago

TimoPtr commented 3 years ago

On the previous version it was very nice to do something like that

.subscribe({}, Timber::e)

while using rxJava, but now the only workarround I found is

.subscribe({}, Forest::e)
JakeWharton commented 3 years ago

This is a consequence of the rewrite in Kotlin, yes. The 5.x version remains binary compatible with 4.x, but there are source-incompatible changes for both Java and Kotlin such as this one.

TimoPtr commented 3 years ago

I made a PR, to propose a solution to this issue. At Kolibree we do use a lot static references to Timber and the migration to 5.x is going to be very painful for use, but I can understand that it's not a very nice solution and you don't want to merge it to the trunk.

TimoPtr commented 3 years ago

@JakeWharton do you think it's an acceptable solution ?