LoggingHook class
A lightweight hook that emits structured logs for each lifecycle stage.
Constructors
- LoggingHook({void logger(String message)?, bool includeContext = false, HookPriority priority = HookPriority.NORMAL})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeContext → bool
-
final
- logger → void Function(String message)?
-
final
- metadata → HookMetadata
-
Hook metadata and configuration
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
after(
HookContext context) → Future< void> -
After successful evaluation
override
-
before(
HookContext context) → Future< Map< String, dynamic> ?> -
Before flag evaluation.
override
-
error(
HookContext context) → Future< void> -
When an error occurs
override
-
finally_(
HookContext context, EvaluationDetails? evaluationDetails, [HookHints? hints]) → Future< void> -
Always executed at the end, now with evaluation details parameter
override
-
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