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

net.codinux.log.JBossLoggingExtensions.kt Maven / Gradle / Ivy

package net.codinux.log

import java.util.logging.Handler
import java.util.logging.LogManager
import java.util.logging.Logger


fun LogManager.getRootLogger() =
    this.getLogger("")

fun LogManager.addHandlerToRootLogger(vararg handlers: Handler) {
    this.getRootLogger().addHandler(*handlers)
}

fun Logger.addHandler(vararg handlers: Handler) {
    handlers.forEach { handler ->
        this.addHandler(handler)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy