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

io.klogging.NoCoLogger

for the corresponding non-coroutine interface.

Functions

debug
Link copied to clipboard
common
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?)
e
Link copied to clipboard
common
abstract suspend fun e(template: String, vararg values: Any?): LogEvent
Evaluates a message template with the supplied values, returning LogEvent.
emitEvent
Link copied to clipboard
common
abstract suspend fun emitEvent(level: Level, throwable: Throwable?, event: Any?)
Emit an event after minimum level checking.
error
Link copied to clipboard
common
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?)
fatal
Link copied to clipboard
common
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?)
info
Link copied to clipboard
common
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?)
isDebugEnabled
Link copied to clipboard
common
open fun isDebugEnabled(): Boolean
Is this logger enabled to emit DEBUG events?
isErrorEnabled
Link copied to clipboard
common
open fun isErrorEnabled(): Boolean
Is this logger enabled to emit ERROR events?
isFatalEnabled
Link copied to clipboard
common
open fun isFatalEnabled(): Boolean
Is this logger enabled to emit FATAL events?
isInfoEnabled
Link copied to clipboard
common
open fun isInfoEnabled(): Boolean
Is this logger enabled to emit INFO events?
isLevelEnabled
Link copied to clipboard
common
open fun isLevelEnabled(level: Level): Boolean
Check whether this logger will emit log events at the specified logging level.
isTraceEnabled
Link copied to clipboard
common
open fun isTraceEnabled(): Boolean
Is this logger enabled to emit TRACE events?
isWarnEnabled
Link copied to clipboard
common
open fun isWarnEnabled(): Boolean
Is this logger enabled to emit WARN events?
log
Link copied to clipboard
common
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?)
minLevel
Link copied to clipboard
common
open fun minLevel(): Level
Minimum level at which to emit log events, determined from current configuration.
trace
Link copied to clipboard
common
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?)
warn
Link copied to clipboard
common
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

name
Link copied to clipboard
common
abstract val name: String
Name of the logger: usually a class name in Java.

Inheritors

KloggerImpl
Link copied to clipboard