LogcatSink

class LogcatSink(minPriority: Int = Log.WARN) : Sink

A Sink that writes structured logs to Android Logcat.

This class is thread-safe; it performs no mutable state changes and delegates to Log.println which is itself thread-safe.

Output format:

D/Checkout: Purchase completed {item_id=SKU-123, price=1980, currency=JPY}

Since

1.0.0

Parameters

minPriority

Minimum log priority to emit. Defaults to Log.WARN.

Constructors

Link copied to clipboard
constructor(minPriority: Int = Log.WARN)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun emit(entry: StructuredLogEntry)

Emit the structured log entry to Logcat with formatted key-value fields.

Link copied to clipboard
open override fun isLoggable(priority: Int): Boolean

Return true if priority is at or above minPriority.