[ZODB-Dev] ZODB transaction audit trail suggestions

Tim Hoffman timhoffman@cams.wa.gov.au
01 Aug 2002 09:14:17 +0800


Hi

I need to provide an audit trail for every change to my zope web sites
and am considering a couple of approaches.

I need to track date time stamp of change, the object changed and what
was changed (i.e. the whole object after the changes or the delta from
the original).  (change being add/update/delete) 

Has anyone done anything similiar that I could leverage off, if not I
suppose I have a number of choices for approaching this, 

1. grab the hi-level commits in ZODB that are successful and write them
to a transaction log. my guess is a monkey patch on BaseStorage
tpc_finish 

2. intercept the store request in ZEO, and write out a transaction log
entry there.

3. have a seperate process reading from the end of Data.fs (a bit like
fsrecover.py ) writing out each transaction as it is writen to Data.fs

I much prefer 1 or 2, as that keeps it abstract enough that I can have
any storage. 

I prefer 1 over 2, as I may not always use ZEO.

Any thoughts/alternatives or suggestions

Regards

Tim Hoffman