Skip to content

Double-O-Seven/slf4k

Repository files navigation

Java CI with Gradle Release Version

slf4k

Kotlin extension functions for SLF4J.

How to use it?

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.