commonMain.kr.jadekim.logger.pipeline.JLogPipe.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of j-logger-jvm Show documentation
Show all versions of j-logger-jvm Show documentation
Logging Library for Kotlin
package kr.jadekim.logger.pipeline
import kr.jadekim.logger.Log
interface JLogPipe {
interface Key
val key: Key
fun install(pipeline: MutableList, index: Int) {
pipeline.add(index, this)
}
fun handle(log: Log): Log?
}
fun List.handle(log: Log) {
var temp: Log? = log
for (each in this) {
if (temp == null) {
break
}
temp = each.handle(temp)
}
}
fun List.contains(key: JLogPipe.Key): Boolean = find { it.key == key } != null
© 2015 - 2025 Weber Informatics LLC | Privacy Policy