-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Overload resolution ambiguity #94
Comments
I will look at that. tinylog 2 should also be easy to use with Kotlin. |
Improved Kotlin support for issue #94
After trying several things, I decided to provide a separate logging API for Kotlin, Scala and Groovy. This is the only way I can deal with the features and specialties of all three programming languages. Here is a preview version for Kotlin: tinylog-kotlin-2.0-SNAPSHOT.zip Some examples that are working now: Logger.info("Hello World!")
Logger.info("Hello {}!", { "Mister" })
Logger.info { "Hello $name!" }
Logger.info(exception) { "Hello $name!" } |
@pmwmedia can you think of a reason this might come up again, in a library project? I think I'm going insane :) |
@danielwilson1702 Which Kotlin and IntelliJ version are you using? |
Sorry for the delay! Kotlin is 1.3.61 and IntelliJ is Android Studio 3.5.3 (actually can't tell how the hell to see a specific IntelliJ version). I think it must be something about marking the project as a library. Whilst the app module in the library project also throws the error, remote consumers of the library are fine. Dependencies in the library gradle file are specified like so:
I will try and make a sample if it helps. |
Ok I spent a little over an hour basically being an idiot, maybe someone else will run into this, you never know! It was confused a little by the fact that the lib consumer is a Java project, so while he uses |
This closed issue has been locked automatically. However, please feel free to file a new issue. |
Hello 👋
After upgrading from 1.3.6 -> 2.0.0-M3, I am getting a function ambiguity issue when invoking any of the log levels (info, warn, etc...) with a String as the only argument.
One of the ways to get around this is to cast the string to Any (Object in Kotlin) to give the compiler a hint.
This may not be a priority if Kotlin is not supported (or if this is intended behavior) - but I thought I'd share.
PS: I love the size, performance, and simplicity of this lib - keep up the great work! 👍
The text was updated successfully, but these errors were encountered: