Skip to content

Instantly share code, notes, and snippets.

View mazzeb's full-sized avatar

Matthias Bargmann mazzeb

View GitHub Profile
import org.slf4j.Logger
import org.slf4j.LoggerFactory.getLogger
import kotlin.properties.ReadOnlyProperty
import kotlin.reflect.KProperty
import kotlin.reflect.full.companionObject
class LoggerDelegate<in R : Any> : ReadOnlyProperty<R, Logger> {
override fun getValue(thisRef: R, property: KProperty<*>): Logger = getLogger(getClassForLogging(thisRef.javaClass))

Keybase proof

I hereby claim:

  • I am mazzeb on github.
  • I am mazzeb (https://keybase.io/mazzeb) on keybase.
  • I have a public key ASDLmydgUSIFYyDNhirt7Tse5o2jtsu7Lat4W7-dY1o6-Qo

To claim this, I am signing this object: