cakephp3 query log

$sources = \Cake\Datasource\ConnectionManager::configured();

foreach ($sources as $source) {
\Cake\Datasource\ConnectionManager::get($source)->logQueries(true);;
}