Logger

fun interface Logger(source)

Sink for the SDK's optional diagnostic traces.

The SDK never logs by default — see NoOpLogger. A consumer that wants to see internal diagnostics (e.g. which dictionary a packet selected, or that the skip-compress path fired) installs its own implementation via TakPacketSdk.logger. This is a fun interface, so a lambda is enough:

TakPacketSdk.logger = Logger { message -> println(message) }

Inheritors

Functions

Link copied to clipboard
abstract fun log(message: String)

Emit a single diagnostic message.