use audit table for other auditing?

LabKey Support Forum (Inactive)
use audit table for other auditing? Ben Bimber  2010-08-03 12:31
Status: Closed
 
we have a nightly postgres backup script. on completion, it inserts a record into a labkey list with some info about that job. it's a perl script and uses the perl api to insert that record.

there's no real problem with this approach, but it occurred to me that the audit table is really designed to hold these sort of events. is there any reason not to insert records into the audit table? can i actually insert a record into audit via the labkey api or would that require either using postgres directly or setting up audit as an external schema?

thanks.
 
 
jeckels responded:  2010-08-03 13:21
Hi Ben,

The audit log isn't currently exposed as a writeable table in the client API. I wouldn't necessarily advise exposing it as an external schema, since one of its intents is to provide a secure log of certain actions within the server. You wouldn't want users, regardless of their permissions, to be able to delete or otherwise modify records of their actions.

I like the idea of allowing the client API to insert (but probably not update or delete) records of certain types, but I'm not sure when we'd be able to get to that.

Thanks,
Josh
 
Ben Bimber responded:  2010-08-03 13:24
ok. our solution of making a list specifically for this works well enough for now. it was actually the mySQL sync logging that made me think about using the audit table instead.