[Catalyst] Audit logs: model or controller?

Ton Voon ton.voon at altinity.com
Mon Sep 17 12:55:52 GMT 2007


Hi!

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  
the controller?

What have others done in similar cases?

Ton

http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon





More information about the Catalyst mailing list