Package-level declarations

Base package containing interfaces and classes of the Klogging public API.

Types

Link copied to clipboard
interface BaseLogger

Base interface of Klogger interface for use in coroutines, and NoCoLogger interface when not using coroutines.

Link copied to clipboard
interface Klogger : BaseLogger

Logger interface for sending log events from suspend functions running in Kotlin coroutines.

Link copied to clipboard
interface Klogging

Utility interface that supplies a Klogger property called logger.

Link copied to clipboard
@Serializable
enum Level : Enum<Level>

Levels of logging severity: higher ordinal values means greater severity.

Link copied to clipboard

Interface for logging from outside coroutines.

Link copied to clipboard
interface NoCoLogging

Utility interface that supplies a NoCoLogger property called logger.

Properties

Link copied to clipboard

Map Levels to syslog levels. Used by other tooling such as Graylog. The level values for syslog are:

Functions

Link copied to clipboard
inline fun <T> logger(vararg loggerContextItems: ContextItem): Klogger
fun logger(ownerClass: KClass<*>, vararg loggerContextItems: ContextItem): Klogger

Returns a Klogger with the name of the specified class.

inline fun <T> logger(otherLogger: BaseLogger?, vararg loggerContextItems: ContextItem): Klogger
fun logger(name: String, otherLogger: BaseLogger?, vararg loggerContextItems: ContextItem): Klogger
fun logger(ownerClass: KClass<*>, otherLogger: BaseLogger?, vararg loggerContextItems: ContextItem): Klogger

fun logger(name: String, vararg loggerContextItems: ContextItem): Klogger

Returns a Klogger with the specified name.

Link copied to clipboard
inline fun <T> noCoLogger(vararg loggerContextItems: ContextItem): NoCoLogger
fun noCoLogger(ownerClass: KClass<*>, vararg loggerContextItems: ContextItem): NoCoLogger

Returns a NoCoLogger with the name of the specified class.

inline fun <T> noCoLogger(otherLogger: BaseLogger?, vararg loggerContextItems: ContextItem): NoCoLogger
fun noCoLogger(name: String, otherLogger: BaseLogger?, vararg loggerContextItems: ContextItem): NoCoLogger
fun noCoLogger(ownerClass: KClass<*>, otherLogger: BaseLogger?, vararg loggerContextItems: ContextItem): NoCoLogger

fun noCoLogger(name: String, vararg loggerContextItems: ContextItem): NoCoLogger

Returns a NoCoLogger with the specified name.