NapierCrashReporter

Dependency-free default CrashReporter that routes everything through AppLog (Napier). Gives the same call sites and breadcrumb discipline as a real backend, minus the upload. Honors the setEnabled kill switch (starts enabled); when disabled, reporting calls drop silently.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun log(breadcrumb: String)

Leave a breadcrumb — the last N are attached to the next report.

Link copied to clipboard
open override fun recordException(throwable: Throwable, message: String? = null)

Report a caught, non-crashing error.

Link copied to clipboard
open override fun setCustomKey(key: String, value: String)

Attach a searchable key/value to subsequent reports.

Link copied to clipboard
open override fun setEnabled(enabled: Boolean)

Telemetry kill switch — when false, subsequent reports drop silently (consent gating, the same way Crashlytics' collection-enabled flag works). Default no-op so existing implementers that don't gate telemetry keep compiling unchanged; reporters that respect consent override it.

Link copied to clipboard
open override fun setUserId(id: String?)

Associate reports with a (non-PII) user/session identifier, or clear it with null.