Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- possibility to define audited entities #24

Merged
merged 2 commits into from
Oct 17, 2017

Conversation

krzysztofruszczynski
Copy link
Contributor

@krzysztofruszczynski krzysztofruszczynski commented Oct 13, 2017

Hello,
I added possibility to declare only those entities, which we want to log. I combined it with unaudited functionality (only unaudited or audited can be declared - if both are declared, only audited are used). In yml configuration we use similar configuration like for unaudited:

data_dog_audit:
audited_entities:
- AppBundle\Entity\AuditedEntity

@l3pp4rd
Copy link
Member

l3pp4rd commented Oct 13, 2017

Hi, these both options are conflicting with each other and as a result are confusing. Create a CompilerPass which reads your audited_entity_list, takes all registered metadata from orm, then diffs these class names with your list and adds call method to the audit subscriber to register the unaudited_list.

Adding such option in this bundle, would be more confusing than useful in my opinion. Though I personally would audit everything, and from time to time archive it and reset audit log with the current state of database as version 1.

@markussc
Copy link

I think that black- and whitelisting are quite common concepts which should not confuse any user of the bundle.
In our case, we have a very large number of tables (entities), but we only need audit for a small set. Auditing all the tables unnecessarily gives a huge overhead and slows down our system. I think this is a very common use case and would therefore very much appreciate it to be part of the this bundle.

@l3pp4rd
Copy link
Member

l3pp4rd commented Oct 17, 2017

OK, fine. in most cases I have an audit log for everything and archive the log from time to time, leaving the latest snapshot available in the log. though, there could be a command doing this. the only way to restore data properly is through whole audit log

@l3pp4rd l3pp4rd merged commit eaaf4e8 into DATA-DOG:master Oct 17, 2017
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