Skip to content

Improve Kotlin/Js logger #499

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

Open
scrat98 opened this issue Apr 17, 2025 · 1 comment · May be fixed by #500
Open

Improve Kotlin/Js logger #499

scrat98 opened this issue Apr 17, 2025 · 1 comment · May be fixed by #500

Comments

@scrat98
Copy link
Contributor

scrat98 commented Apr 17, 2025

Part 2 of #480

Currently, for Kotlin/JS, there's a workaround involving LoggerDelegate, which prevents using the "idiomatic" approach. To address this, I rewrote the implementation to support all possible logger declaration use cases and added test coverage. However, it seems that using parameterized tests isn't an option, which is why there are so many changes. You’ll also find a "TODO: use parameterized test?" comment in the code.

But then I also realized that this code also will work with Kotlin/WASM and decided to add tests and change implementation as well.

Braking changes

  • Logger property delegate for Kotlin/Js was removed. It's not possible to make it work in case of companion object.

Other changes

  • Covered all use cases for Kotlin/js and Kotlin/wasm

Also should fix #315 I suppose

scrat98 added a commit to scrat98/kotlin-logging that referenced this issue Apr 17, 2025
@scrat98 scrat98 linked a pull request Apr 17, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant