StructuredLogSink
An optional extension of LogSink for destinations that want structured key-value attributes alongside the formatted message — e.g. to populate OpenTelemetry log record Attributes, or any other structured-logging backend, instead of only a flat string.
This is additive: existing LogSink implementations are unaffected and keep receiving the log text exactly as before via the inherited log(level, category, message, throwable). KenworkLogger calls the structured overload only when its sink implements this interface, and this interface's default implementation simply forwards to the plain LogSink.log, so implementing only log with 4 arguments remains a complete, valid LogSink.
Functions
As LogSink.log, plus structured key-value context for this log line (e.g. "http.status_code" to 503, "kenwork.endpoint_id" to "videos/:id"). Values are left as Any? rather than String so a bridge can pass them through to a structured logging API's native attribute types without stringifying first.