KmpWorkerLogger

Pluggable logging interface for KMPWorker.

By default KMPWorker logs nothing (silent in production). Set a custom logger during app initialization:

KmpWorkerConfig.configure {
logger = KmpWorkerLogger.Logger { level, msg, throwable ->
println("[$level] $msg")
}
}

// Android shortcut:
KmpWorkerAndroidLogger.install()

Types

Link copied to clipboard
Link copied to clipboard
fun interface Logger

Logger interface. Implement this to plug in Logcat, Timber, Crashlytics, etc.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun d(message: String)
Link copied to clipboard
fun e(message: String, throwable: Throwable? = null)
Link copied to clipboard
fun i(message: String)
Link copied to clipboard

Installs a custom logger. Pass null to silence all output.

Link copied to clipboard
fun v(message: String)
Link copied to clipboard
fun w(message: String, throwable: Throwable? = null)