Package-level declarations

Types

Link copied to clipboard
abstract class AbstractLogger : Logger

An abstract implementation of a logger. This class delegates the trace, debug, info, warn, and error methods to a centralized log method which accepts LogLevel as a parameter. By default, this class uses no-op implementations for all other members unless overridden in a subclass.

Link copied to clipboard

An abstract implementation of a logger provider. By default, this class uses no-op implementations for all members unless overridden in a subclass.

Link copied to clipboard

An abstract implementation of a log record builder. By default, this class uses no-op implementations for all members unless overridden in a subclass.

Link copied to clipboard
interface Logger

Internal logging facade

Link copied to clipboard
interface LoggerProvider

Entry point for creating Logger instances

Link copied to clipboard
data class LoggingContextElement(val kvPairs: Map<String, Any>)

Coroutine scoped telemetry context used for carrying telemetry provider configuration

Link copied to clipboard
Link copied to clipboard

Construct a logging record that can be emitted to an underlying logger.

Link copied to clipboard
typealias MessageSupplier = () -> String

Inherited properties

Link copied to clipboard
val <Error class: unknown class>.loggingContext: Map<String, Any>

Functions

Link copied to clipboard
inline suspend fun <R> withLogCtx(vararg kvPairs: <Error class: unknown class><String, Any>, crossinline block: suspend () -> R): R

Execute block with key/value pairs set in the logging context. These will be automatically added to any log record executed via CoroutineContext.log.

Inherited functions

Link copied to clipboard
fun Logger.debug(msg: String)

Add a log message if debug logging is enabled

inline fun <T> <Error class: unknown class>.debug(ex: Throwable? = null, noinline content: () -> String)
fun <Error class: unknown class>.debug(sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs a debug message using the current LoggerProvider configured in this CoroutineContext.

Link copied to clipboard
fun Logger.error(msg: String)

Add a log message if error logging is enabled

inline fun <T> <Error class: unknown class>.error(ex: Throwable? = null, noinline content: () -> String)
fun <Error class: unknown class>.error(sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs an error message using the current LoggerProvider configured in this CoroutineContext.

Link copied to clipboard

Get the logger for the class T

Link copied to clipboard
fun Logger.info(msg: String)

Add a log message if info logging is enabled

inline fun <T> <Error class: unknown class>.info(ex: Throwable? = null, noinline content: () -> String)
fun <Error class: unknown class>.info(sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs an info message using the current LoggerProvider configured in this CoroutineContext.

Link copied to clipboard
inline fun <T> <Error class: unknown class>.log(level: LogLevel, ex: Throwable? = null, noinline content: () -> String)
fun <Error class: unknown class>.log(level: LogLevel, sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs a message using the current LoggerProvider configured in this CoroutineContext.

Link copied to clipboard
inline fun <T> <Error class: unknown class>.logger(): Logger
fun <Error class: unknown class>.logger(sourceComponent: String): Logger

Get a Logger instance using the current LoggerProvider configured in this CoroutineContext

Link copied to clipboard
fun Logger.trace(msg: String)

Add a log message if trace logging is enabled

inline fun <T> <Error class: unknown class>.trace(ex: Throwable? = null, noinline content: () -> String)
fun <Error class: unknown class>.trace(sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs a trace message using the current LoggerProvider configured in this CoroutineContext.

Link copied to clipboard
fun Logger.warn(msg: String)

Add a log message if warn logging is enabled

inline fun <T> <Error class: unknown class>.warn(ex: Throwable? = null, noinline content: () -> String)
fun <Error class: unknown class>.warn(sourceComponent: String, ex: Throwable? = null, content: () -> String)

Logs a warning message using the current LoggerProvider configured in this CoroutineContext.