Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
abstract class KlaviyoException(val message: String) : Exception

Exceptions that automatically hook into our logger

Link copied to clipboard
open class KLog : Log
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias Registration = () -> Any
Link copied to clipboard
object Registry

Services registry for decoupling SDK components Acts as a very basic Service Locator for internal SDK dependencies

Functions

Link copied to clipboard
fun Log.Level.log(tag: String, msg: String, ex: Throwable? = null): Int

Bridge between the Klaviyo Log levels and Android static log functions

Link copied to clipboard
inline fun <T> T.safeApply(block: () -> Unit): T

Safe apply function that logs KlaviyoExceptions rather than crash

Link copied to clipboard
inline fun <T> safeCall(block: () -> T): T?

Safely invoke a function and log KlaviyoExceptions rather than crash