Skip to content

Instantly share code, notes, and snippets.

@wms
Created May 7, 2013 15:57
Show Gist options
  • Save wms/5533740 to your computer and use it in GitHub Desktop.
Save wms/5533740 to your computer and use it in GitHub Desktop.
<?php
use lithium\analysis\Logger;
use lithium\data\Connections;
Logger::config([
'default' => [
'adapter' => 'File',
'file' => function() { return "combined.log"; },
'format' => "{:timestamp} {:priority}\t{:message}\n"
]
]);
Connections::get('default')->applyFilter('_execute', function($self, $params, $chain) {
Logger::debug($params['sql']);
return $chain->next($self, $params, $chain);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment