Package-level declarations

Types

Link copied to clipboard
class ErrorReportThrottle(limit: Int = DEFAULT_LIMIT, windowMs: Long = DEFAULT_WINDOW_MS, maxKeys: Int = DEFAULT_MAX_KEYS, nowMs: () -> Long)

Caps how often one repeating error signature is reported to Crashlytics and Datadog.

Link copied to clipboard

Marks a Throwable as an expected condition: a state the app is designed to encounter and recover from, caused by the environment rather than by a defect in this code.

Link copied to clipboard
object InMemoryLogBuffer : LogWriter

A bounded in-memory ring buffer of recent Kermit log lines. Desktop has no system logcat, so install this writer at startup (Logger.setLogWriters(platformLogWriter(), InMemoryLogBuffer)) to let the Debug screen view and export the app's own logs. Lines are formatted to loosely match Android's logcat -v time shape (L/tag: message) so the same viewer/filters work on both platforms.

Link copied to clipboard

Room's connection pool reports an acquire timeout, with a dump naming each connection's holder, only through printStackTrace on System.err, which reaches neither Kermit nor the crash backends. This forwards that one throwable's message to the log, at most once per interval, and passes all output through unchanged.

Functions

Link copied to clipboard

Returns the ExpectedCondition.expectedConditionLabel of the first ExpectedCondition in this throwable's cause chain, or null when nothing in the chain is an expected condition.

Link copied to clipboard

Returns true when this throwable, or anything in its cause chain, is an ExpectedCondition.

Link copied to clipboard
fun shouldDowngradeForDatadog(severity: Severity, throwable: Throwable?): Boolean

Whether the Datadog writer must downgrade an error-level log to WARN.

Link copied to clipboard
fun shouldReportAsException(severity: Severity, throwable: Throwable?): Boolean

Whether a log line should become a Crashlytics non-fatal.