AuditLog class
Records security- and operationally-relevant actions to an AuditRepository, stamping each with a generated id and the current time.
Constructors
- AuditLog(AuditRepository _repository, {Clock clock = const SystemClock(), IdGenerator ids = const UuidGenerator()})
- Creates an audit log backed by an AuditRepository.
Properties
- clock → Clock
-
The time source used to stamp entries.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- ids → IdGenerator
-
The id generator used for entry ids.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recent(
{int limit = 100}) → Future< List< AuditEntry> > - The most recent entries, newest first.
-
record(
{required String principal, required String action, required AuditOutcome outcome, String? target, String? detail}) → Future< void> - Appends an audit entry.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited