<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Jesse,<div><br></div><div>Ive used DBIx::Class::AuditAny successfully for data level auditing, with an added user column for tracking who did what. Ive popped it in a gist here:</div><div><br></div><div><a href="https://gist.github.com/TBSliver/caaf87d7165c53e2e55cdffb47c2fefc">https://gist.github.com/TBSliver/caaf87d7165c53e2e55cdffb47c2fefc</a></div><div><br></div><div>If you want something other than data level auditing then I dont know what would work for that, but this is atleast a good starting point! The docs do mention using a file to dump the data, so the DBIC stuff may be irrelevant to you though:</div><div><br></div><div><a href="https://metacpan.org/pod/DBIx::Class::AuditAny#coderef-collector-to-a-file">https://metacpan.org/pod/DBIx::Class::AuditAny#coderef-collector-to-a-file</a><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Tom</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 27 Mar 2019 at 13:55, Jesse Sheidlower &lt;<a href="mailto:jester@panix.com">jester@panix.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I think I asked about this a while ago on IRC, but I lost track of the discussion....<br>
<br>
I have a large Catalyst app that uses DBIx::Class. We&#39;ve had a few issues where we need to see an audit log. In some cases we can re-run an action on a staging server with DBIC_TRACE enabled, but in other cases we really need to see what happened on the production machine.<br>
<br>
Is there an easy way to log either all the database-changing statements, or all SQL period? Obviously the latter would be huge, but might be worth it.<br>
<br>
I&#39;ve seen DBIx::Class::AuditLog, which requires that relevant statements be wrapped in a transaction, and DBIx::Class::QueryLog, which seems to be intended for debugging purposes only. I need something that just takes everything and logs it to a text file, without having to rewrite the entire codebase. How do I accomplish this?<br>
<br>
_______________________________________________<br>
List: <a href="http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class" rel="noreferrer" target="_blank">http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class</a><br>
IRC: <a href="http://irc.perl.org#dbix-class" rel="noreferrer" target="_blank">irc.perl.org#dbix-class</a><br>
SVN: <a href="http://dev.catalyst.perl.org/repos/bast/DBIx-Class/" rel="noreferrer" target="_blank">http://dev.catalyst.perl.org/repos/bast/DBIx-Class/</a><br>
Searchable Archive: <a href="http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk" rel="noreferrer" target="_blank">http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk</a><br>
</blockquote></div>