UrlExclusionFilter<T> class
Suppresses logging for URLs matching any of excludedPatterns.
Works with any event type T by extracting the URL via urlExtractor.
Returns false (suppress) when the URL matches at least one pattern.
- Inheritance
-
- Object
- NetworkFilter<
T> - UrlExclusionFilter
Constructors
-
UrlExclusionFilter({required List<
Pattern> excludedPatterns, required Uri urlExtractor(T)?, DiagnosticCaptureMode captureMode = DiagnosticCaptureMode.balanced}) -
Creates a compatibility filter for a URI-only boundary.
const
-
UrlExclusionFilter.trustedText({required List<
Pattern> excludedPatterns, required String urlExtractor(T)}) -
Creates a functional URL filter from caller-owned immutable URL text.
const
Properties
- captureMode → DiagnosticCaptureMode
-
Capture policy used by the URI compatibility constructor.
final
-
excludedPatterns
→ List<
Pattern> -
Patterns to match against the full URL string.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- trustedUrlExtractor → String Function(T)?
-
Extracts URL text whose provenance is controlled by the caller.
final
- urlExtractor → Uri Function(T)?
-
Extracts an arbitrary Uri from the event value.
final
Methods
-
apply(
T value) → bool -
Returns
trueifvalueshould be logged.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