# logging in kotlin

# kotlin.logging

class FooWithLogging {
  companion object: KLogging()

  fun bar() {
    logger.info { "hello $name" }
  }

  fun logException(e: Exception) {
    logger.error(e) { "Error occured" }
  }
}

Using kotlin.logging framework

# Remarks

Related question: Idiomatic way of logging in Kotlin