DataDogAuditBundle icon indicating copy to clipboard operation
DataDogAuditBundle copied to clipboard

Filter fields

Open dozsan opened this issue 1 year ago • 0 comments

The point is that the audit log should be able to save not all fields in all cases

class Entity {
    private string $field1;
    private string $field2;
    private string $field3;
    private string $field4;
}

If default - Here we went to every field

data_dog_audit:
    audited_entities:
        App\Entity\Entity: ~

If mode include - Here we save only the fields field1, field2, field3

data_dog_audit:
    audited_entities:
        App\Entity\Entity:
            mode: 'include'
            fields:
                - field1
                - field2
                - field3

If mode exclude - Here we exclude field4

data_dog_audit:
    audited_entities:
        App\Entity\Entity:
            mode: 'exclude'
            fields:
                - field4

dozsan avatar Sep 19 '24 06:09 dozsan