AnalyticsLogger
object AnalyticsLogger
In-memory analytics recorder with observable, read-only history.
Each log call records a distinct occurrence and snapshots its parameters. History belongs to this logger; consumers cannot insert or remove records through logs. Read logs inside composition to observe updates, rather than remembering a returned snapshot.
See also
Samples
AnalyticsLogger.log(
AnalyticsLog(
tag = "HomeScreen",
screenClass = "com.example.ui.HomeScreen",
timestamp = Clock.System.now().toEpochMilliseconds(),
type = AnalyticsLogCategory.Screen.View
)
)Content copied to clipboard
Properties
Functions
Link copied to clipboard
Records log with a fresh internal occurrence ID and an immutable copy of its parameters. Snapshot-state storage supports calls from different threads and notifies observing UI.