All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlinx.jupyter.api.KernelLoggerFactory.kt Maven / Gradle / Ivy

There is a newer version: 0.12.0-335
Show newest version
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)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy