Klogger

interface Klogger : BaseLogger

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

Every function is a suspend function and should only be called in another suspend function.

See also

for the corresponding non-coroutine interface.

Inheritors

Functions

Link copied to clipboard
open suspend fun debug(event: Any?)
open suspend fun debug(event: suspend Klogger.() -> Any?)
open suspend fun debug(template: String, vararg values: Any?)
open suspend fun debug(throwable: Throwable, event: Any?)
open suspend fun debug(throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun debug(throwable: Throwable, template: String, vararg values: Any?)
Link copied to clipboard
abstract suspend fun e(template: String, vararg values: Any?): LogEvent

Evaluates a message template with the supplied values, returning LogEvent.

Link copied to clipboard
abstract suspend fun emitEvent(level: Level, throwable: Throwable?, event: Any?)

Emit an event after minimum level checking.

Link copied to clipboard
open suspend fun error(event: Any?)
open suspend fun error(event: suspend Klogger.() -> Any?)
open suspend fun error(template: String, vararg values: Any?)
open suspend fun error(throwable: Throwable, event: Any?)
open suspend fun error(throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun error(throwable: Throwable, template: String, vararg values: Any?)
Link copied to clipboard
open fun eventFrom(context: String?, level: Level, throwable: Throwable?, eventObject: Any?, contextItems: EventItems = mapOf()): LogEvent

Construct a LogEvent from a range of types.

Link copied to clipboard
open suspend fun fatal(event: Any?)
open suspend fun fatal(event: suspend Klogger.() -> Any?)
open suspend fun fatal(template: String, vararg values: Any?)
open suspend fun fatal(throwable: Throwable, event: Any?)
open suspend fun fatal(throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun fatal(throwable: Throwable, template: String, vararg values: Any?)
Link copied to clipboard
open suspend fun info(event: Any?)
open suspend fun info(event: suspend Klogger.() -> Any?)
open suspend fun info(template: String, vararg values: Any?)
open suspend fun info(throwable: Throwable, event: Any?)
open suspend fun info(throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun info(throwable: Throwable, template: String, vararg values: Any?)
Link copied to clipboard

Is this logger enabled to emit DEBUG events?

Link copied to clipboard

Is this logger enabled to emit ERROR events?

Link copied to clipboard

Is this logger enabled to emit FATAL events?

Link copied to clipboard

Is this logger enabled to emit INFO events?

Link copied to clipboard
open fun isLevelEnabled(level: Level): Boolean

Check whether this logger will emit log events at the specified logging level.

Link copied to clipboard

Is this logger enabled to emit TRACE events?

Link copied to clipboard

Is this logger enabled to emit WARN events?

Link copied to clipboard
open suspend fun log(level: Level, event: Any?)
open suspend fun log(level: Level, event: suspend Klogger.() -> Any?)
open suspend fun log(level: Level, template: String, vararg values: Any?)
open suspend fun log(level: Level, throwable: Throwable, event: Any?)
open suspend fun log(level: Level, throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun log(level: Level, throwable: Throwable, template: String, vararg values: Any?)
Link copied to clipboard
open fun minLevel(): Level

Minimum level at which to emit log events, determined from current configuration.

Link copied to clipboard
open suspend fun trace(event: Any?)
open suspend fun trace(event: suspend Klogger.() -> Any?)
open suspend fun trace(template: String, vararg values: Any?)
open suspend fun trace(throwable: Throwable, event: Any?)
open suspend fun trace(throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun trace(throwable: Throwable, template: String, vararg values: Any?)
Link copied to clipboard
open suspend fun warn(event: Any?)
open suspend fun warn(event: suspend Klogger.() -> Any?)
open suspend fun warn(template: String, vararg values: Any?)
open suspend fun warn(throwable: Throwable, event: Any?)
open suspend fun warn(throwable: Throwable, event: suspend Klogger.() -> Any?)
open suspend fun warn(throwable: Throwable, template: String, vararg values: Any?)

Properties

Link copied to clipboard
abstract val name: String

Name of the logger: usually a class name in Java.