AUDIT : Log data table changes in YII

hI,

It is sometimes necessary to keep track of what changes were made to the database, and by whom. This is known as Audit Logging or an Audit Trail. I have seen several different ways of implementing Audit Logging, but have any ideas about hot to build this based on YII core?

Quote

Developers are spared the chore of designing and building auditing software as RADICORE comes supplied with a pre-built Audit Logging system which allows auditing to take place without the need to construct any additional audit tables or database triggers. All database changes are automatically written to the audit database whose contents can be viewed using a standard set of online screens.


CREATE TABLE IF NOT EXISTS `audit_fld` (


  `session_id` bigint(20) unsigned NOT NULL default '0',


  `tran_seq_no` smallint(6) unsigned NOT NULL default '0',


  `table_seq_no` smallint(6) unsigned NOT NULL default '0',


  `field_id` varchar(255) NOT NULL default '',


  `old_value` text,


  `new_value` text,


  PRIMARY KEY  (`session_id`,`tran_seq_no`,`table_seq_no`,`field_id`),


  KEY `field_id` (`field_id`)


);

lIKE this based on radicore:

http://www.tonymarst…l/auditlog.html

(builden in www.radicore.org framework)

regards

have any ideia about how to start anythink to log users activity?

:)

This might help (not perfect though):

http://code.google.c…blebehavior.php

and documentation for it:

http://code.google.c…ogable_behavior