-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Logs changes #18153
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
base: develop
Are you sure you want to change the base?
Logs changes #18153
Conversation
|
I also did not add the history tab to all of those 'systems objects' - I'm just recording the changes in the action_log, is all (for now). |
|
We also probably don't want Settings included in that general log. |
|
Okay, I've made it so that Settings changes get logged to a separate table, and added a migration to create that table. Example contents: |
|
Also - note - I did not build any way to actually view that new Adminlog table. |

(This change is 'stacked' against the other PR I have open about the action_type Enum).
This is the start of the universal 'LogsChanges' trait, which we should be able to apply to things like Categories, and Status Labels, and other things like that, so we can log any changes that are made to settings or configuration.
Right now, it does successfully log creation, deletion, updates, and restores. I expect to apply it to most of the Models that we have that aren't "checkoutable".
The output you get in the action_logs looks roughly correct, but the links back to the original objects don't work yet (of course).
Does this approach make sense? Should I try to fill out just one Model (I'm using Categories for my sample case), or should I just apply it everywhere? I'm pretty sure I can also log changes to the Settings table the exact same way - the very same
log_metashould be able to report back anything that changes on the table like any other.Open Questions
nullfor nowLoggabletrait to the newLogsChangestrait. I only saw one place where anylogBlah()method was used (on 'restore' from soft-deleted) - and that use-case is at least fully subsumed byLogsChanges. Did I miss something, or are there any other reasons to stick withLoggablehere?