audited
audited copied to clipboard
Audits with line of code location
We recently have been checking the audits table to find out a cause of an unexpected update operation. We weren't expecting one of the attribute of a model to get updated and eventually sending out emails, but we came to know that there's was a separate entry of that update action in the table and since our code base is very big, it was hard to debug the location of that update operation. This scenario made me wondered if there could be a way to also store a class name and line of code as well so that it becomes easier to debug sometimes why/where operations are performed by checking out the logic.
So a new column action_location
or something that will store a file name with a line of code e.g app/services/update_user.rb#L56
.
I'm not really sure how useful it would be to add this support in the audited
engine but I'd love to know more thoughts on this from others.