Skip to content

Instantly share code, notes, and snippets.

@pasamio
Created January 11, 2014 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pasamio/8365793 to your computer and use it in GitHub Desktop.
Save pasamio/8365793 to your computer and use it in GitHub Desktop.
Quick line to put in Joomla debug plugin to output queries to a log file. Put just after the $log = $db->getLog() line.
<?php
file_put_contents('/tmp/joomla_querylog_' . time() . '.log', implode("\n", array_map(function ($item) { return str_replace("\n", " ", $item); }, $log)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment