On Wed, Mar 27, 2019 at 09:54:59AM -0400, Jesse Sheidlower wrote: > I'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?
DBIx::Class::QueryLog is easy to sub-class, so you could write one that you load, and then it just writes to a file instead of remembering stuff. I believe you'd just need to over-ride query_end (to make it write the file and prevent it from remembering stuff) and quary_class() which is just an implementation detail. -- David Cantrell | Hero of the Information Age Irregular English: you have anecdotes; they have data; I have proof _______________________________________________ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk