logger

fun logger(func: () -> Unit): KLogger

This method allow defining the logger in a file in the following way:

private val logger = KotlinLogging.logger {}

fun logger(name: String): KLogger

This method allow defining the logger in a file in the following way:

private val logger = KotlinLogging.logger("io.github.oshai.kotlinlogging.MyLogger")

In most cases the name represents the package notation of the file that the logger is defined in.