If you really want every query log in yii use yii db profiler extension.
Step1. Download extension from --> link
Step2. Unpack to protected/extensions/
Step3. Rename folder name yii-db-profiler-master to db_profiler
Step4. Update the following to your protected/config/main.php:
<?php
return array(
// …
'components' => array(
// …
'db' => array(
// …
'enableProfiling'=>true,
'enableParamLogging' => true,
),
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
// …
array(
'class'=>'ext.db_profiler.DbProfileLogRoute',
'countLimit' => 1, // How many times the same query should be executed to be considered inefficient
'slowQueryMin' => 0.01, // Minimum time for the query to be slow
),
),
),
),
);