DBIx::Class::AuditLog

(man I think the styles in reaveal.js need some minor tweaking)

Simple activity audit logging for DBIx::Class

2012-09-27 — Toronto Perl Mongers

View on Metacpan

What we needed it for.

At $work we had a need to add user activity logging to one of our internal APIs.

We already had some logging code written for Class::DBI, however the new app happily used DBIx::Class.

Alternatives

DBIx::Class::Journal https://metacpan.org/module/DBIx::Class::Journal

 

DBIx::Class::Shadow https://github.com/frioux/dbix-class-shadow-presentation

Not much else.

What do we log? When does it ocur?

  • Enabled for all insert/update/delete actions wrapped in "txn_do" statements
  • Transactions are saved as Changesets
  • Each Changeset can have many Actions
  • Actions can have many Changes. An Action can be of type insert/update/delete
  • Changes show the data that was changed during an action

Additional DBIC column attributes

Go to https://metacpan.org/module/DBIx::Class::AuditLog#ADDITIONAL-DBIC-COLUMN-ATTRIBUTES

Table Structure>

Go to https://metacpan.org/module/DBIx::Class::AuditLog#TABLE-STRUCTURE