Skip to content

Support for DI? #569

@hrodrick

Description

@hrodrick

Hi! Looking at the library docs, we can get a logger by doing this
val logger = KotlinLogging.logger {}
Which internally gets the class of the {} function sent to the logger. This is valid when we can get the logger "as is" on simple use cases.

However, when using DI it would be preferable to get this logger through the DI system itself. But I couldn't figure out how to get a logger with a valid name, since the logger expects a function () -> Unit which I cannot give from the dependent classes.

Am I explaying it correctly? Or am I missing something?

Edit:
Now that I think about it, is this library compatible with code minification/obfuscation? That is a must for mobile apps

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions