You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The direct logging settings have been moved into a nested namespace. Old: KotlinLoggingConfiguration.logLevel = Level.INFO → New: KotlinLoggingConfiguration.direct.logLevel = Level.INFO. The same applies to appender and formatter. The property logFactory has also been renamed to loggerFactory. Additionally, DefaultLoggerFactory and KotlinLoggingLevel.kt (shadowed extension functions) have been removed.
2. KLogger API cleanup — deprecated methods removed (#586)
All deprecated methods have been deleted from KLogger, including legacy SLF4J-style string overloads (e.g., info(msg: String?)) and deprecated property accessors (e.g., isTraceEnabled). The API is now strictly lambda-oriented for lazy evaluation.
The surviving method shapes are:
funinfo(message: () ->Any?) // standard
funinfo(throwable:Throwable?, message: () ->Any?) // with exception
funinfo(marker:Marker?, message: () ->Any?) // with marker
funinfo(marker:Marker?, throwable:Throwable?, message: () ->Any?) // full
The = null default value has also been removed from the throwable parameter in marker-accepting signatures to prevent compiler ambiguity and positional argument mishaps. Marker overloads that were previously deprecated have been restored as the primary, idiomatic way to log with markers.
The headline change of the release. This implements a Universal Provider Architecture, enabling swappable logging implementations across all platforms (JVM, Android, Native, Darwin, JS, and Wasm), and promotes the "Direct" logging implementation to be a first-class citizen available on every platform.
KotlinLoggingConfiguration is now accessible from commonMain and serves as the single entry point, with loggerFactory controlling the active provider.
DirectLoggerFactory and DarwinLoggerFactory have been moved from internal packages to io.github.oshai.kotlinlogging, allowing users to explicitly reference them when configuring KotlinLoggingConfiguration.loggerFactory.
You can now write a custom Appender once in commonMain and use it on every platform. On JVM/Android/Darwin, this requires opt-in via KotlinLoggingConfiguration.loggerFactory = DirectLoggerFactory.
Platform defaults: JVM defaults to SLF4J (with auto-detection of JUL, Logback, or Direct), Android detects AndroidNativeLoggerFactory or falls back to SLF4J, Darwin defaults to DarwinLoggerFactory (OSLog), and Native/JS/Wasm default to DirectLoggerFactory.
The configuration also prints warnings if you try to configure direct properties (like appender) while the active factory is not DirectLoggerFactory, preventing silent-ignore confusion.
A timestamp: Long field has been added to KLoggingEvent to capture event time. This is implemented via a new internal multiplatform KLoggingClock that provides getCurrentTime() on all targets (JVM/Android, JS, Native, Wasm) without external dependencies.
A logStartupMessage property has been added to KotlinLoggingConfiguration to allow disabling the "kotlin-logging: initializing..." startup message. It is implemented for all platforms (JVM, Android, Darwin, JS, Native, Wasm).
A module-info.java has been added, allowing kotlin-logging to be used as a named module in modularized Java applications. It uses a Multi-Release JAR strategy so that Kotlin classes still target Java 1.8, while the module descriptor targets Java 9+. Static requirements are declared for optional dependencies including Logback, kotlinx-coroutines-slf4j, and GraalVM native image.
The active factory diagnostic message is now printed during KotlinLogging's lazy initialization rather than eagerly, preventing premature logging before configuration is complete. The direct logging configuration factory check has also been centralized into a common internal function applied consistently across all platform setters.
Two PRs tackled the same underlying Darwin bug. os_log redacts dynamic strings by default in historical logs (viewed via log show or Console.app) for privacy. DarwinKLogger was updated to use %{public}s as a fixed format string, passing the message as an argument and explicitly marking it as public data to prevent redaction. PR #590 was a first attempt; #594 completed the fix properly by introducing a C-interop definition (oslog.def) with a static inline function that passes a constant C string literal to os_log_with_type, which is required for clang to place the format string in the correct binary section for log archival to work. If you're on Darwin and previously saw <compose failure> when reading historical logs, this is now resolved.
Activity
github-actions commentedon Mar 13, 2026
Thank you for reporting an issue. See the wiki for documentation and slack for questions.
oshai commentedon Mar 13, 2026
https://github.com/oshai/kotlin-logging/releases/tag/8.0.01
nickcaballero commentedon Apr 16, 2026
Generated by Claude:
kotlin-logging 8.0.01 — Complete Summary
🚨 Breaking Changes
1. Configuration structure overhaul (#584)
The direct logging settings have been moved into a nested namespace. Old:
KotlinLoggingConfiguration.logLevel = Level.INFO→ New:KotlinLoggingConfiguration.direct.logLevel = Level.INFO. The same applies toappenderandformatter. The propertylogFactoryhas also been renamed tologgerFactory. Additionally,DefaultLoggerFactoryandKotlinLoggingLevel.kt(shadowed extension functions) have been removed.2.
KLoggerAPI cleanup — deprecated methods removed (#586)All deprecated methods have been deleted from
KLogger, including legacy SLF4J-style string overloads (e.g.,info(msg: String?)) and deprecated property accessors (e.g.,isTraceEnabled). The API is now strictly lambda-oriented for lazy evaluation.The surviving method shapes are:
The
= nulldefault value has also been removed from thethrowableparameter in marker-accepting signatures to prevent compiler ambiguity and positional argument mishaps. Marker overloads that were previously deprecated have been restored as the primary, idiomatic way to log with markers.✨ New Features
3. Unified, swappable logger provider architecture (#584)
The headline change of the release. This implements a Universal Provider Architecture, enabling swappable logging implementations across all platforms (JVM, Android, Native, Darwin, JS, and Wasm), and promotes the "Direct" logging implementation to be a first-class citizen available on every platform.
KotlinLoggingConfigurationis now accessible fromcommonMainand serves as the single entry point, withloggerFactorycontrolling the active provider.DirectLoggerFactoryandDarwinLoggerFactoryhave been moved frominternalpackages toio.github.oshai.kotlinlogging, allowing users to explicitly reference them when configuringKotlinLoggingConfiguration.loggerFactory.Appenderonce incommonMainand use it on every platform. On JVM/Android/Darwin, this requires opt-in viaKotlinLoggingConfiguration.loggerFactory = DirectLoggerFactory.AndroidNativeLoggerFactoryor falls back to SLF4J, Darwin defaults toDarwinLoggerFactory(OSLog), and Native/JS/Wasm default toDirectLoggerFactory.directproperties (likeappender) while the active factory is notDirectLoggerFactory, preventing silent-ignore confusion.4. Timestamp added to
KLoggingEvent(#591)A
timestamp: Longfield has been added toKLoggingEventto capture event time. This is implemented via a new internal multiplatformKLoggingClockthat providesgetCurrentTime()on all targets (JVM/Android, JS, Native, Wasm) without external dependencies.5. Suppress startup message (#589)
A
logStartupMessageproperty has been added toKotlinLoggingConfigurationto allow disabling the"kotlin-logging: initializing..."startup message. It is implemented for all platforms (JVM, Android, Darwin, JS, Native, Wasm).6. JPMS support (#592)
A
module-info.javahas been added, allowingkotlin-loggingto be used as a named module in modularized Java applications. It uses a Multi-Release JAR strategy so that Kotlin classes still target Java 1.8, while the module descriptor targets Java 9+. Static requirements are declared for optional dependencies including Logback,kotlinx-coroutines-slf4j, and GraalVM native image.🐛 Fixes & Refactors
7. Initialization timing fix (#585)
The active factory diagnostic message is now printed during
KotlinLogging's lazy initialization rather than eagerly, preventing premature logging before configuration is complete. The direct logging configuration factory check has also been centralized into a common internal function applied consistently across all platform setters.8. Darwin OSLog redaction fix (#590 + #594)
Two PRs tackled the same underlying Darwin bug.
os_logredacts dynamic strings by default in historical logs (viewed vialog showor Console.app) for privacy.DarwinKLoggerwas updated to use%{public}sas a fixed format string, passing the message as an argument and explicitly marking it as public data to prevent redaction. PR #590 was a first attempt; #594 completed the fix properly by introducing a C-interop definition (oslog.def) with a static inline function that passes a constant C string literal toos_log_with_type, which is required forclangto place the format string in the correct binary section for log archival to work. If you're on Darwin and previously saw<compose failure>when reading historical logs, this is now resolved.9. CI/action fix (#593)
A minor fix to the GitHub Actions workflow — no user-facing impact.
Migration TL;DR
The things most likely to affect you when upgrading from 7.x:
KotlinLoggingConfiguration.logLevel/appender/formatter→KotlinLoggingConfiguration.direct.*logFactory→loggerFactoryKLoggermethods (info(msg: String?),isTraceEnabled, etc.) and replace with lambda equivalentsDefaultLoggerFactoryclass directly, switch to the appropriate platform-specific factory orDirectLoggerFactory