log

abstract fun log(level: MqttLogLevel, tag: String, message: String, throwable: Throwable? = null)

Called when the library produces a log message at or above the configured level.

Parameters

level

The severity level of this log message.

tag

A short identifier for the source component (e.g. "MqttClient", "MqttConnection").

message

The log message. Only constructed when the level passes filtering.

throwable

Optional exception associated with this log entry.