-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: use Kermit for logging instead of slf4j
slf4j is JVM only and blocks the lib from migrating to KMP. This change migrates to use [Kermit](https://github.com/touchlab/Kermit), developed by touchlab. Kermit is a very simple logger implementation that supports many KMP targets. Kermit is also very lightweight and has no additional dependencies: ```kotlin \--- co.touchlab:kermit:2.0.4 \--- co.touchlab:kermit-jvm:2.0.4 +--- co.touchlab:kermit-core:2.0.4 | \--- co.touchlab:kermit-core-jvm:2.0.4 | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.22 (*) ``` With slf4j (before, jvm only): ``` 2024-06-25 15:36:41 [Test worker @kotlinx.coroutines.test runner#17] INFO me.tb.cashuclient.Wallet - Wallet initialized with mint url https://testnut.cashu.space and unit 'sat'. ``` With Kermit (now, kmp): ``` Info: (me.tb.cashuclient.Wallet) Wallet initialized with mint url https://testnut.cashu.space and unit 'sat'. ```` Main difference is that `slf4j` by default prints out timestamp of the log along with a thread name, whereas kermit does not. If needed, implementing a more custom log formatting is easy by providing a custom [LogWriter](https://kermit.touchlab.co/docs/details/LOG_WRITER/). Work towards resolving issue #3.
- Loading branch information
1 parent
b1b8e84
commit afe963f
Showing
3 changed files
with
12 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.