Package io.github.oshai

Types

Link copied to clipboard
interface ActualKLogger
Appender
Link copied to clipboard
interface Appender
interface Appender
ConsoleOutputAppender
Link copied to clipboard
object ConsoleOutputAppender : Appender
object ConsoleOutputAppender : Appender
DefaultMessageFormatter
Link copied to clipboard
object DefaultMessageFormatter : Formatter
object DefaultMessageFormatter : Formatter
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
object KMarkerFactory

A platform independent factory to create markers.

Link copied to clipboard
object KotlinLogging
KotlinLoggingConfiguration
Link copied to clipboard
object KotlinLoggingConfiguration
object KotlinLoggingConfiguration
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
class OSLogSubsystemAppender(val subsystem: String) : OSLogAppender
Link copied to clipboard
class SimpleNativeTest

Functions

Link copied to clipboard
fun KLogger.isEnabledForLevel(level: Level): Boolean

Returns whether this Logger is enabled for a given Level.

isLoggingEnabled
Link copied to clipboard
fun Level.isLoggingEnabled(): Boolean
fun Level.isLoggingEnabled(): Boolean
Link copied to clipboard
fun KotlinLogging.logger(): ReadOnlyProperty<Any?, KLogger>

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
expect val DefaultAppender: Appender