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

io.mockk.impl.log.Logger.kt Maven / Gradle / Ivy

The newest version!
package io.mockk.impl.log

import kotlin.reflect.KClass

interface Logger {
    fun error(msg: () -> String)
    fun error(ex: Throwable, msg: () -> String)
    fun warn(msg: () -> String)
    fun warn(ex: Throwable, msg: () -> String)
    fun info(msg: () -> String)
    fun info(ex: Throwable, msg: () -> String)
    fun debug(msg: () -> String)
    fun debug(ex: Throwable, msg: () -> String)
    fun trace(msg: () -> String)
    fun trace(ex: Throwable, msg: () -> String)

    companion object {
        var loggerFactory: (KClass<*>) -> Logger = { NoOpLogger() }
        inline operator fun  invoke() = loggerFactory(T::class)
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy