org.jetbrains.kotlinx.jupyter.api.KernelLoggerFactory.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-jupyter-api Show documentation
Show all versions of kotlin-jupyter-api Show documentation
API for libraries supporting Kotlin Jupyter notebooks
package org.jetbrains.kotlinx.jupyter.api
import org.slf4j.Logger
import kotlin.reflect.KClass
/**
* Factory interface for creating slf4j-compatible loggers.
*/
interface KernelLoggerFactory {
fun getLogger(category: String): Logger
fun getLogger(clazz: Class<*>): Logger
}
fun KernelLoggerFactory.getLogger(kClass: KClass<*>): Logger {
return getLogger(kClass.java)
}
inline fun KernelLoggerFactory.logger(): Logger {
return getLogger(T::class)
}