EventBuilder mixin

Mixin for adapters that modify or enhance event data before processing.

EventBuilder adapters are called during the event creation phase and can modify the PreEventContext to add formatted data, enrich information, or perform preprocessing.

Example:

class TimestampBuilder extends PVLogAdapter with EventBuilder {
  @override
  void buildEvent(PreEventContext context, List<PVLogAdapter> upcomingAdapters) {
    context.extra['timestamp_formatted'] = {
      'iso': context.timestamp.toIso8601String(),
      'local': context.timestamp.toLocal().toString(),
    };
  }
}
Superclass constraints
Mixin applications

Properties

hashCode int
The hash code for this object.
no setterinherited
intents List<AdapterIntent>
The types of operations this adapter can perform.
no setteroverride
levelFilter int?
The minimum level required for events to be processed by this adapter.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

buildEvent(PreEventContext context, List<PVLogAdapter> upcomingAdapters) → void
Modifies the event context before the final event is created.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited