kotlin-logging is a logging facade for Kotlin that provides a unified API and a multiplatform logging interface. It functions as a wrapper for various backend frameworks, including SLF4J, to enable consistent event recording across different JVM and Kotlin Multiplatform targets.
The library centers on lazy message evaluation, which prevents expensive string construction unless the specific log level is active. This is achieved through a lazy-evaluated logger that computes messages only when the current severity level permits.
The project supports structured application logging with metadata and exceptions, automatic logger initialization based on the surrounding class, and native backend routing to redirect output to platform-specific logging systems. It also includes global log level configuration to control message emission across the system.