kosi-libs / Canard

Kotlin/Multiplatform lightweight logging library.

Home Page:https://kosi-libs.org/canard/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maven Central Github Actions MIT License Slack channel

Canard - Kotlin Multiplatform Logging library

Canard is a lightweight Kotlin Multiplatform logging library with a simple API, working on:

  • JVM / Android
  • iOS, as well as all Kotlin/Native targets
  • JavaScript / WasmJS

Canard allows you to:

  • Easily set up logging in a Kotlin Multiplatform
  • Log what you need on different levels
  • Avoid worrying about platform-specific frontend implementations

Canard is a good choice because:

  • It integrates nicely with all Kotlin/Multiplatform targets
  • It has a straightforward design with a user-friendly and comprehensible API.

Installation

repositories {
    mavenCentral()
}

kotlin {
    sourceSets {
        commonMain {
            dependencies {
                implementation("org.kodein.log:canard:{version}")
            }
        }
    }
}

Example

// Simple example
val loggerFactory = LoggerFactory(defaultLogFrontend)
val logger = newLogger(loggerFactory)

logger.info { "Welcome to ..." }
logger.warning { "... the Canard documentation!" }

Read more

See Canard documentation.

About

Kotlin/Multiplatform lightweight logging library.

https://kosi-libs.org/canard/

License:MIT License


Languages

Language:Kotlin 100.0%