KloggerImpl

class KloggerImpl(val name: String, val loggerContextItems: EventItems = mapOf()) : Klogger

Standard implementation of Klogger.

Constructors

Link copied to clipboard
constructor(name: String, loggerContextItems: EventItems = mapOf())

Properties

Link copied to clipboard
open override val loggerContextItems: EventItems

context items belonging to this logger

Link copied to clipboard
open override val name: String

logger name

Functions

Link copied to clipboard
open suspend fun debug(event: Any?)

Emit a log event at DEBUG level.

open suspend fun debug(event: suspend Klogger.() -> Any?)

Emit a log event from a lambda at DEBUG level.

open suspend fun debug(template: String, vararg values: Any?)

Emit a log event from a message template at DEBUG level.

open suspend fun debug(message: String, items: EventItems)

Emit a log event with a message and an explicit map of items at DEBUG level.

open suspend fun debug(throwable: Throwable, event: Any?)

Emit a log event and associated throwable object at DEBUG level.

open suspend fun debug(throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object at DEBUG level.

open suspend fun debug(message: String, throwable: Throwable, items: EventItems)

Emit a log event with a message, associated throwable object and an explicit map of items at DEBUG level.

open suspend fun debug(throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object at DEBUG level.

Link copied to clipboard
open suspend override fun e(template: String, vararg values: Any?): LogEvent

Construct a LogEvent from a template and values.

Link copied to clipboard
open suspend override fun emitEvent(level: Level, throwable: Throwable?, event: Any?, items: EventItems)

Emit an event to be dispatched and sent.

Link copied to clipboard
open suspend fun error(event: Any?)

Emit a log event at ERROR level.

open suspend fun error(event: suspend Klogger.() -> Any?)

Emit a log event from a lambda at ERROR level.

open suspend fun error(template: String, vararg values: Any?)

Emit a log event from a message template at ERROR level.

open suspend fun error(message: String, items: EventItems)

Emit a log event with a message and an explicit map of items at ERROR level.

open suspend fun error(throwable: Throwable, event: Any?)

Emit a log event and associated throwable object at ERROR level.

open suspend fun error(throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object at ERROR level.

open suspend fun error(message: String, throwable: Throwable, items: EventItems)

Emit a log event with a message, associated throwable object and an explicit map of items at ERROR level.

open suspend fun error(throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object at INFO level.

Link copied to clipboard
open fun eventFrom(context: String? = null, level: Level, throwable: Throwable? = null, eventObject: Any? = null, contextItems: EventItems = mapOf()): LogEvent

Construct a LogEvent from a range of types.

Link copied to clipboard
open suspend fun fatal(event: Any?)

Emit a log event at FATAL level.

open suspend fun fatal(event: suspend Klogger.() -> Any?)

Emit a log event from a lambda at FATAL level.

open suspend fun fatal(template: String, vararg values: Any?)

Emit a log event from a message template at FATAL level.

open suspend fun fatal(message: String, items: EventItems)

Emit a log event with a message and an explicit map of items at FATAL level.

open suspend fun fatal(throwable: Throwable, event: Any?)

Emit a log event and associated throwable object at FATAL level.

open suspend fun fatal(throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object at FATAL level.

open suspend fun fatal(message: String, throwable: Throwable, items: EventItems)

Emit a log event with a message, associated throwable object and an explicit map of items at FATAL level.

open suspend fun fatal(throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object at FATAL level.

Link copied to clipboard
open suspend fun info(event: Any?)

Emit a log event at INFO level.

open suspend fun info(event: suspend Klogger.() -> Any?)

Emit a log event from a lambda at INFO level.

open suspend fun info(template: String, vararg values: Any?)

Emit a log event from a message template at INFO level.

open suspend fun info(message: String, items: EventItems)

Emit a log event with a message and an explicit map of items at INFO level.

open suspend fun info(throwable: Throwable, event: Any?)

Emit a log event and associated throwable object at INFO level.

open suspend fun info(throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object at INFO level.

open suspend fun info(message: String, throwable: Throwable, items: EventItems)

Emit a log event with a message, associated throwable object and an explicit map of items at INFO level.

open suspend fun info(throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object at INFO level.

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?)

Emit a log event, only if it passes the level check.

open suspend fun log(level: Level, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda, only if it passes the level check.

open suspend fun log(level: Level, template: String, vararg values: Any?)

Emit a log event from a message template, only if it passes the level check.

open suspend fun log(level: Level, message: String, items: EventItems)

Log an event with a message and an explicit set of items.

open suspend fun log(level: Level, throwable: Throwable, event: Any?)

Emit a log event and associated throwable object, only if it passes the level check.

open suspend fun log(level: Level, throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object, only if it passes the level check.

open suspend fun log(level: Level, throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object, only if it passes the level check.

open suspend fun log(level: Level, throwable: Throwable, message: String, items: EventItems)

Log an event with an associated throwable, a message and an explicit set of items.

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?)

Emit a log event at TRACE level.

open suspend fun trace(event: suspend Klogger.() -> Any?)

Emit a log event from a lambda at TRACE level.

open suspend fun trace(template: String, vararg values: Any?)

Emit a log event from a message template at TRACE level.

open suspend fun trace(message: String, items: EventItems)

Emit a log event with a message and an explicit map of items at TRACE level.

open suspend fun trace(throwable: Throwable, event: Any?)

Emit a log event and associated throwable object at TRACE level.

open suspend fun trace(throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object at TRACE level.

open suspend fun trace(message: String, throwable: Throwable, items: EventItems)

Emit a log event with a message, associated throwable object and an explicit map of items at TRACE level.

open suspend fun trace(throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object at TRACE level.

Link copied to clipboard
open suspend fun warn(event: Any?)

Emit a log event at WARN level.

open suspend fun warn(event: suspend Klogger.() -> Any?)

Emit a log event from a lambda at WARN level.

open suspend fun warn(template: String, vararg values: Any?)

Emit a log event from a message template at WARN level.

open suspend fun warn(message: String, items: EventItems)

Emit a log event with a message and an explicit map of items at WARN level.

open suspend fun warn(throwable: Throwable, event: Any?)

Emit a log event and associated throwable object at WARN level.

open suspend fun warn(throwable: Throwable, event: suspend Klogger.() -> Any?)

Emit a log event from a lambda and associated throwable object at WARN level.

open suspend fun warn(message: String, throwable: Throwable, items: EventItems)

Emit a log event with a message, associated throwable object and an explicit map of items at WARN level.

open suspend fun warn(throwable: Throwable, template: String, vararg values: Any?)

Emit a log event from a message template and associated throwable object at WARN level.