KtaleLogger

interface KtaleLogger

Logging abstraction.

Design note

KTale avoids prescribing a logging backend. Platforms may route logs to:

  • console

  • file

  • structured telemetry

  • remote sinks

Implementations should treat context as optional structured data.

Functions

Link copied to clipboard
open fun debug(message: String)
open fun debug(message: String, throwable: Throwable?)
open fun debug(message: String, throwable: Throwable?, context: Map<String, Any?>)
Link copied to clipboard
open fun error(message: String)
open fun error(message: String, throwable: Throwable?)
open fun error(message: String, throwable: Throwable?, context: Map<String, Any?>)
Link copied to clipboard
open fun info(message: String)
open fun info(message: String, throwable: Throwable?)
open fun info(message: String, throwable: Throwable?, context: Map<String, Any?>)
Link copied to clipboard
open fun log(level: LogLevel, message: String)
open fun log(level: LogLevel, message: String, throwable: Throwable?)

Java-friendly overload.

abstract fun log(level: LogLevel, message: String, throwable: Throwable?, context: Map<String, Any?>)

Logs a message at level with optional structured context.

Link copied to clipboard
open fun trace(message: String)
open fun trace(message: String, throwable: Throwable?)
open fun trace(message: String, throwable: Throwable?, context: Map<String, Any?>)
Link copied to clipboard
open fun warn(message: String)
open fun warn(message: String, throwable: Throwable?)
open fun warn(message: String, throwable: Throwable?, context: Map<String, Any?>)