Skip to main content

herald_log 1.0.1 copy "herald_log: ^1.0.1" to clipboard
herald_log: ^1.0.1 copied to clipboard

A Herald vendor that prints every event, property and call as a readable record, for debug builds.

Herald log #

A Herald vendor that prints every call as a readable record, for debug builds:

[herald] event   checkout_started
    ├─ plan  = pro
    └─ seats = 3
[herald] prop    total_purchases = 2
[herald] reset
final AnalyticsLogger logger = debugPrint;
final logTracker = LogAnalyticsTrackerService(
  eventTrackerFactory: CompositeLogEventTrackerFactory([
    ScreenViewLogEventTrackerFactory(logger),
    GenericLogEventTrackerFactory(logger),
  ]),
  propertySetterFactory: CompositeLogPropertySetterFactory([
    GenericLogPropertySetterFactory(logger),
  ]),
);
final logService = LogAnalyticsService(logger);

final herald = Herald(
  providers: [
    if (kDebugMode)
      HeraldProvider(
        name: 'log',
        events: logTracker,
        properties: logTracker,
        identity: logService,
        lifecycle: logService,
        consent: logService,
      ),
  ],
);

The user id is printed as-is, so register this provider in debug builds only.

Documentation #

It works with herald, the core, whose page lists every Herald package. The Herald website has the guides, and the repository has an example app.

0
likes
0
points
561
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

A Herald vendor that prints every event, property and call as a readable record, for debug builds.

Repository (GitHub)
View/report issues

Topics

#analytics #logging #debugging

License

unknown (license)

Dependencies

herald

More

Packages that depend on herald_log