Logger

interface Logger

Abstraction used by the CGS SDK to emit log messages.

Implementations decide where logs should be forwarded (e.g. Logcat, Crashlytics, analytics pipelines) and which levels should be actually emitted based on minLevel.

SDK consumers may provide a custom implementation to integrate with their own logging stack.

Inheritors

Properties

Link copied to clipboard
abstract val minLevel: LogLevel

The lowest severity this logger cares about. The SDK does not check it: every message reaches the logger, which does its own filtering.

Functions

Link copied to clipboard
abstract fun d(message: String, t: Throwable? = null)

Logs at LogLevel.DEBUG: verbose detail useful while integrating.

Link copied to clipboard
abstract fun e(message: String, t: Throwable? = null)

Logs at LogLevel.ERROR: a failure the SDK could not recover from.

Link copied to clipboard
abstract fun i(message: String, t: Throwable? = null)

Logs at LogLevel.INFO: normal lifecycle and diagnostic events.

Link copied to clipboard
abstract fun w(message: String, t: Throwable? = null)

Logs at LogLevel.WARN: something unexpected that the SDK recovered from.