Skip to content

Logging library for Kotlin with no external dependencies.

License

Notifications You must be signed in to change notification settings

MythicDrops/kindling

Repository files navigation

kindling

kindling is a Kotlin library for logging with no external dependencies.

It was initially developed for use in my Spigot plugins and libraries.

It is inspired by log4k by saschpe.

Installation

Use JCenter to get the library.

repositories {
    jcenter()
}

dependencies {
    compileOnly "io.pixeloutlaw:kindling:x.y.z"
}
repositories {
    jcenter()
}

dependencies {
    compileOnly("io.pixeloutlaw:kindling:x.y.z")
}

Usage

import io.pixeloutlaw.kindling.Log

// ...
Log.addLogger(object : Logger() {
    override val minimumLogLevel: Log.Level = Log.Level.DEBUG

    override fun print(logRecord: LogRecord) {
        println(logRecord)
    }
})

Log.debug("message here")

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT