LogFilter class final

Selection conditions for entries: period, levels, tags, attributes, text. All conditions are combined with AND; an empty condition accepts any entry.

Part of LogQuery; the viewer uses it as its filter too.

Annotations
  • @immutable

Constructors

LogFilter({DateTime? after, DateTime? before, Set<LogLevel> levels = const {}, Set<String> tags = const {}, List<LogAttribute<Object>> attributes = const [], String text = ''})
const

Properties

after → DateTime?
Only entries strictly after this moment.
final
attributes → List<LogAttribute<Object>>
Only entries where each of these attributes equals the given value (LogFilter(attributes: [userId('42')])); an empty list means any.
final
before → DateTime?
Only entries strictly before this moment.
final
conditions → List<LogCondition>
The filter as a set of conditions: one per set field, one per tag and per attribute. A store with its own query language translates exactly these (LogCondition), and matches checks the same ones, so the meaning of the selection is defined in one place.
no setter
hashCode → int
The hash code for this object.
no setteroverride
isEmpty → bool
No conditions at all.
no setter
levels → Set<LogLevel>
Only entries of these levels; an empty set means any.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags → Set<String>
Only entries that have all of these tags; an empty set means any.
final
text → String
Only entries whose message or error text (LogError.toString) contains this substring, case-insensitively; an empty string means any.
final

Methods

copyWith({DateTime? after()?, DateTime? before()?, Set<LogLevel>? levels, Set<String>? tags, List<LogAttribute<Object>>? attributes, String? text}) → LogFilter
A copy with the given conditions replaced; omitted ones are kept.
matches(LogEntry entry) → bool
Whether the entry matches all conditions (conditions).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override