Package-level declarations

Types

Link copied to clipboard
interface Appender
ConsoleOutputAppender
Link copied to clipboard
Link copied to clipboard
class DarwinKLogger(val name: String, val underlyingLogger: os_log_t) : KLogger, DelegatingKLogger<os_log_t>
Link copied to clipboard
class DefaultMessageFormatter(includePrefix: Boolean = true) : Formatter
Link copied to clipboard
interface DelegatingKLogger<T>
Link copied to clipboard
interface Formatter
Link copied to clipboard
abstract class FormattingAppender : Appender
Link copied to clipboard
interface KLoggable

An interface representing class with logging capabilities implemented using a logger obtain a logger with logger() method

Link copied to clipboard
interface KLogger

A Logger interface with Lazy message evaluation example:

Link copied to clipboard
open class KLogging : KLoggable

A class with logging capabilities usage example:

Link copied to clipboard
data class KLoggingEvent(val level: Level, val marker: Marker?, val loggerName: String, val message: String? = null, val cause: Throwable? = null, val payload: Map<String, Any?>? = null)
Link copied to clipboard
Link copied to clipboard

A platform independent factory to create markers.

Link copied to clipboard
KotlinLoggingConfiguration
Link copied to clipboard
Link copied to clipboard
enum Level : Enum<Level>
Link copied to clipboard
object Levels
Link copied to clipboard
interface Marker

A platform independent marker to enrich log statements.

Link copied to clipboard
open class NamedKLogging(name: String) : KLoggable

A class with logging capabilities and explicit logger name

Properties

Link copied to clipboard
actual val DefaultAppender: Appender

Functions

Link copied to clipboard
Link copied to clipboard

The JS way to define a logger without explicit name

Link copied to clipboard
inline fun <T> withLoggingContext(vararg pair: Pair<String, String?>, restorePrevious: Boolean = true, body: () -> T): T

Use a vary number of pairs in MDC context. Example:

inline fun <T> withLoggingContext(pair: Pair<String, String?>, restorePrevious: Boolean = true, body: () -> T): T

Use a pair in MDC context. Example:

inline fun <T> withLoggingContext(map: Map<String, String?>, restorePrevious: Boolean = true, body: () -> T): T

Use a map in MDC context. Example: