Hi! Pretty new to Koin and I have a question: is i...
# koin
g
Hi! Pretty new to Koin and I have a question: is it possible to somehow get a reference to the class that is being injected into in a factory automatically? My use-case is wanting to do constructor injection for loggers, something like this:
Copy code
class Service(private val logger: Logger)

module {
    factory { Service(get()) }
    // This is the part I'd like to happen automatically, without the need for a "by inject"
    // Inside "Service" this should be called with Service::class.java
    factory { cls: Class<*> -> LoggerFactory.getLogger(cls) }
}
Is there any way to achieve this? I tried to look through all the available docs but haven't found anything. Thanks in advance