Skip to content

Latest commit

 

History

History
63 lines (48 loc) · 2.59 KB

README.md

File metadata and controls

63 lines (48 loc) · 2.59 KB

log4k-slf4j

Build Maven Central GitHub License GitHub commit activity GitHub issues Kotlin

A Comprehensive Logging and Tracing Solution for Kotlin Multiplatform.

This project provides a robust, event-driven logging and tracing platform specifically designed for Kotlin Multiplatform (also compatible with the Java ecosystem). Built with coroutines and channels at its core, it offers asynchronous, scalable logging across multiple platforms.

This project also tries to be fully compatible with OpenTelemetry standard.

Important

The project is in a very early stage; thus, breaking changes should be expected.

📖 Documentation

🏠 Homepage (under construction)

Usage

repositories {
    mavenCentral()
}

dependencies {
    // https://central.sonatype.com/artifact/io.github.smyrgeorge/log4k-slf4j
    implementation("io.github.smyrgeorge:log4k-slf4j:x.y.z")
}

Spring Boot

If you add the SLF4J dependency to a Spring Boot project without adjustments, SLF4J will detect multiple providers and raise an error. This happens because SLF4J’s auto-discovery mechanism finds more than one logging implementation (in this case, both log4k and logback). To resolve this and ensure everything works smoothly, you need to exclude the logback implementation from your Gradle dependencies.

Here’s how you can do it:

dependencies {
    implementation("org.springframework.boot:spring-boot-starter") {
        exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging")
        // Alternatively, exclude Logback specifically
        // exclude(group = "ch.qos.logback")
    }
}