![]() |
Audit Logging or an Audit Trail - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Audit Logging or an Audit Trail (/showthread.php?tid=32834) |
Audit Logging or an Audit Trail - El Forum - 08-06-2010 [eluser]tisoysasugbo[/eluser] Hi All, Does anybody knows about audit logging or audit trail in CI?Any plugin that's already available? I need to be able to log all changes from INSERT/UPDATE/DELETE on every table. This must include table name, field old value, field new value and user. Appreciate if anybody can give me an idea. Thanks, Audit Logging or an Audit Trail - El Forum - 08-06-2010 [eluser]WanWizard[/eluser] I have solved that by extending the database class (requires a core hack) and overloading the insert, update, delete and where (i need the selection criteria) methods. If you want to have the old value too, you need to come up with an solution to read and compare, which might be difficult if an update or delete affects multiple rows. Audit Logging or an Audit Trail - El Forum - 08-06-2010 [eluser]tisoysasugbo[/eluser] Thanks for the response ![]() Oh... do I have to this from scratch? ![]() Any plugin that I can use? Audit Logging or an Audit Trail - El Forum - 08-07-2010 [eluser]WanWizard[/eluser] I can't give you full code at the moment, development of the exitecms workflow engine is done in a non-public branch. But you can check the code in the main trunk to see how you have to modify the database library to allow the DB_Active_rec.php to be extended. Click on the link below and go to "browse source". Audit Logging or an Audit Trail - El Forum - 08-10-2010 [eluser]tisoysasugbo[/eluser] Thanks, I will go thru this first and study it. |