I have seen database triggers where the audit is just a copy of the record 
before any change is made. You can do a generic one (where table structures are 
just copied)
Date: Mon, 19 Nov 2007 11:31:31 -0500
From: [EMAIL PROTECTED]
To: [email protected]
Subject: [CFCDEV] Re: Audit Log

That would probably work. You could also consider using AOP to do the logging 
(would require using ColdSpring though), or using a database trigger (might be 
too limiting in terms of what it can capture and the fact that it would have to 
be defined for all tables you want to audit).


On Nov 19, 2007 11:10 AM, Patrick McElhaney <[EMAIL PROTECTED]> wrote:


I have to put together an audit log for a CMS.

My plan is to store the log in simple un-normalized database table.

- id
- timestamp
- userid
- category (always 'articles' for now)
- key (always articleID for now)

- action (create, update, delete, discard changes, lock, unlock, restore)
- data (the article serialized)

I have other types of content (not articles) and I may want to include
other state changes down the road. I figure this way I can track

anything with a simple method call: auditLog.log(userid, category,
key, action, data).

It seems deceptively simple. Having never built any kind of audit log,
I thought I would check to see if anyone has advice about what to keep

in mind.

Thanks,

Patrick




--
Patrick McElhaney
704.560.9117









_________________________________________________________________
It's simple! Sell your car for just $30 at CarPoint.com.au
http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fsecure%2Dau%2Eimrworldwide%2Ecom%2Fcgi%2Dbin%2Fa%2Fci%5F450304%2Fet%5F2%2Fcg%5F801459%2Fpi%5F1004813%2Fai%5F859641&_t=762955845&_r=tig_OCT07&_m=EXT
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to