Kotlin extension functions for SLF4J.
It's very simple:
package com.example
import ch.leadrian.slf4k.logger
import ch.leadrian.slf4k.info
class MyService {
companion object {
private val log = logger()
}
fun doSomething(foo: String) {
log.info { "foo = $foo" }
}
}
The above example create a logger with the name com.example.MyService
and logs a lazily computed message at INFO
level.