Skip to content

Comments

feat: add $doNotRecordEvents property to exclude specific events from logging#1438

Closed
Muetze42 wants to merge 1 commit intospatie:mainfrom
Muetze42:main
Closed

feat: add $doNotRecordEvents property to exclude specific events from logging#1438
Muetze42 wants to merge 1 commit intospatie:mainfrom
Muetze42:main

Conversation

@Muetze42
Copy link

@Muetze42 Muetze42 commented Jan 19, 2026

Personally, I often only need to except the created, for example. With this commit, every could specifically exclude events.
And wouldn’t have to pay attention to soft deletes, etc., in $recordEvents.

Before:

    protected static array $recordEvents = [
        'updated',
        'deleted',
        'restored',
    ];

  // or
    protected static array $recordEvents = [
        'updated',
        'deleted',
    ];

Afterm, always:

    protected static array $doNotRecordEvents = [
        'updated',
    ];

@freekmurze
Copy link
Member

Merged with fixes: added missing code fence in docs and a test for the new $doNotRecordEvents feature. Thanks for the contribution!

@freekmurze freekmurze closed this Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants