Just wondering, why wouldn't Koin have a logging w...
# koin
d
Just wondering, why wouldn't Koin have a logging wrapper like KotlinLogging does, with lambdas to provide the text only if that logging level is enabled? It would add much more value to the wrapper...
a
question of performance optimisation, to avoid any run of function
d
You could always use inline functions for this with crossinline. Then it'll be the exact same as writing an if to test the level before running the logging line.
I think most people like to avoid the verbosity of having to write ifs all over with their debugging logs (or avoiding having to comment them out every time...).
But anyways, it's debatable if people prefer optimizations like this to code readability...
a
You can propose somthing and we can benchmark 👍
any help is welcome
I agree, smarter API is always better
d
Yup, if I get a chance, I'll try. In the meantime, we have KotlinLogging spread out all over, I guess it'll take a while until we can change over anyways.