Is there a recommended way to use a logger from a ...
# kotlin-logging
z
Is there a recommended way to use a logger from a public inline function? I could do
@PublishedApi internal val logger = KotlinLogging.logger {}
but that would get confusing with my other loggers. Should I just give it a unique name or is there a better way?
Another option would be to have the function take the logger as a parameter.
o
In my opinion logger should be per class/file so it should be private and not a public api
z
I know, but you can’t use it in a public inline function if it’s private.
o
Yes now I understand. Don't have a good solution for you.
z
Yeah I can’t think of any great solutions either, thanks.