public function setupLogging(Event $event)
{
foreach ($this->_getSources() as $connectionName) {
try {
$this->_getSource($connectionName)->logQueries(true);
$this->_getSource($connectionName)->logger(new QueryLogger());
} catch (MissingDatasourceConfigException $e) {
//Safe to ignore this :-)
}
}
}