![JAR search and dependency download from the Maven repository](/logo.png)
commonTest.a.A.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of klog Show documentation
Show all versions of klog Show documentation
Kotlin multiplatform logging implementation
package a
import klog.klog
import klog.klogName
class A {
/**
*We have to provide a log name for the JS platform
* otherwise could just use `klog()`
*/
private val log = klog("a.A")
fun test() {
if (!log.isEnabled) log.warn("LOG DISABLED")
if (!log.isTraceEnabled) log.warn("TRACING DISABLED")
if (!log.isDebugEnabled) log.warn("DEBUG DISABLED")
if (!log.isInfoEnabled) log.warn("INFO DISABLED")
if (!log.isWarnEnabled) log.warn("WARN DISABLED")
if (!log.isErrorEnabled) log.warn("ERROR DISABLED")
log.trace("A.test(): testing ${this::class.klogName()} ")
log.debug("more testing")
log.info("finished testing")
log.warn(this::class.klogName())
log.error("error message")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy