Skip to content

AuditLog: add entry_count property #6

@practicalmind-dev

Description

@practicalmind-dev

The only way to check how many entries have been recorded is len(audit.entries), which copies the internal list unnecessarily.

Expected behavior:

audit = AuditLog()
audit.record(result)

assert audit.entry_count == 1

What needs to change:
Add an entry_count property to AuditLog in gateframe/audit/log.py that returns len(self._entries) directly.
A test in tests/audit/test_log.py should verify the count increments correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions