Kotlin doesn\'t have the same notion of static fields as used in Java. In Java, the generally accepted way of doing logging is:
public class Foo { privat
fun R.logger(): Lazy = lazy { LoggerFactory.getLogger((if (javaClass.kotlin.isCompanion) javaClass.enclosingClass else javaClass).name) } class Foo { val logger by logger() } class Foo { companion object { val logger by logger() } }