I have a requirement for adding an audit log of certain actions
(creating an object, editing the object, etc) to our web app. In my
mind, it is best to do this at the model, so it is consistent
regardless of the method of access.
However, one key bit of information I'd like to save is the user at
the web app level. But this is not passed to the model. What would be
a good way of having that information passed to the model (I was
thinking of setting an environment variable at the start of a request
and then removing it at the end)? Or is it best to have audit logs at
What have others done in similar cases?
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725