https://github.com/rtakland/klogging
A lightweight kotlin multiplatform logging framework support several platforms
https://github.com/rtakland/klogging
kmp kotlin log logging multiplatform
Last synced: about 1 year ago
JSON representation
A lightweight kotlin multiplatform logging framework support several platforms
- Host: GitHub
- URL: https://github.com/rtakland/klogging
- Owner: RTAkland
- License: apache-2.0
- Created: 2025-04-05T03:46:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-12T06:07:31.000Z (about 1 year ago)
- Last Synced: 2025-04-12T07:22:30.396Z (about 1 year ago)
- Topics: kmp, kotlin, log, logging, multiplatform
- Language: Kotlin
- Homepage:
- Size: 99.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KLogging
A lightweight kotlin multiplatform logging framework support several platforms
- linuxX64
- linuxArmX64
- macosX64
- macosArmX64
- mingwX64
- jvm(1.8)
# Usage
```kotlin
// build.gradle.kts
repositories {
maven("https://repo.maven.rtast.cn/releases/")
}
kotlin {
sourceSets {
commonMain.dependencies {
implementation("cn.rtast.klogging:klogging:")
}
}
}
// main.kt
fun main() {
val logger1 = KLogging.getLogger("Test1").apply {
setLoggingLevel(LogLevel.ERROR)
}
val logger2 = KLogging.getLogger("Test2").apply {
setLoggingLevel(LogLevel.DEBUG)
}
logger1.info("info")
logger1.error("error")
logger2.debug("debug")
}
```
> The latest version can be found at https://repo.maven.rtast.cn/#/releases/cn/rtast/klogging/klogging
# 中文文档
# KLogging
轻量级的Kotlin multiplatform的日志框架, 无任何依赖即可使用, 按照上方的配置即可使用