Not Compatible With Timber 5
rs-georg opened this issue · 4 comments
Lumberjack uses a hardcoded dependency on Timber 4.7.1 which is not backwards compatible with Timber 5.
Timber 5 is binary compatible with 4.X according to Jake Wharton (https://github.com/JakeWharton/timber/releases/tag/5.0.0). As in any library, you can simply exclude the dependency from lumberjack and add your own timber version instead.
Also, feel free to fork and update the library and create a pull request - I probably will update it but don't know when yet...
Thanks for your reply. Yes, you're right. That's what it states in the release notes. However, I couldn't get Lumberjack to work with Timber5 🤔 It's not a priority for now since we can continue using the previous version.
I get the following error when I try to use Lumberjack with Timber 5.0.1
java.lang.NoSuchMethodError: No super method getTag()Ljava/lang/String; in class Ltimber/log/Timber$Tree; or its super classes (declaration of 'timber.log.Timber$Tree' appears in /data/data/<package-name>/code_cache/.overlay/base.apk/classes20.dex)
Looks like the tag is not public API anymore in Timber 5
@get:JvmSynthetic // Hide from public API. internal open val tag: String? get() { val tag = explicitTag.get() if (tag != null) { explicitTag.remove() } return tag }
I opened an issue here: JakeWharton/timber#477
I don't think it will be changed because timber looks quite abandoned, but I think, updating to timber 5 is not that important as you get all kotlin features from lumberjack anyways and timber is just hidden internally...
So for now I'll close this issue.
Note
I could upgrade to timber v5, but this would mean I'd need to access the tag in Timber.Tree
via reflection and I think its not worth that...