Sink

interface Sink

Abstraction for structured log destinations.

StructuredTree delegates each log entry to registered Sinks. Implement this interface to send structured logs to Crashlytics, Logcat, Datadog, or any other backend.

Implementations must be safe to call from any thread, as StructuredTree may invoke emit from whichever thread the log call originates on.

Since

1.0.0

Functions

Link copied to clipboard
abstract fun emit(entry: StructuredLogEntry)

Emit a structured log entry to this destination.

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

Whether this Sink should handle the given log priority.