Skip to content
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

Not Compatible With Timber 5 #11

Closed
rs-georg opened this issue Nov 16, 2021 · 4 comments
Closed

Not Compatible With Timber 5 #11

rs-georg opened this issue Nov 16, 2021 · 4 comments

Comments

@rs-georg
Copy link

Lumberjack uses a hardcoded dependency on Timber 4.7.1 which is not backwards compatible with Timber 5.

@MFlisar
Copy link
Owner

MFlisar commented Nov 17, 2021

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...

@rs-georg
Copy link
Author

rs-georg commented Jan 4, 2022

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.

@mohit92
Copy link

mohit92 commented Aug 15, 2022

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 }

@MFlisar
Copy link
Owner

MFlisar commented Oct 19, 2022

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...

@MFlisar MFlisar closed this as completed Oct 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants