Package-level declarations

Types

Link copied to clipboard
interface ActualKLogger
Appender
Link copied to clipboard
interface Appender
interface Appender
ConsoleOutputAppender
Link copied to clipboard
DefaultMessageFormatter
Link copied to clipboard
Formatter
Link copied to clipboard
interface Formatter
interface Formatter
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
actual interface KLogger
actual typealias KLogger = ActualKLogger
actual interface KLogger : ActualKLogger

A Logger interface with Lazy message evaluation example:

actual typealias KLogger = ActualKLogger
expect 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

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

Link copied to clipboard
open class OSLogAppender : Appender
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns whether this Logger is enabled for a given Level.

isLoggingEnabled
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:

Properties

Link copied to clipboard