Enable SQL logging to the screen on Yii

Last updated:

This is what the "log" component in your config file should look like:

'log' => [
    'class' => 'CLogRouter',
        'routes' => [
        [
            'class' => 'CWebLogRoute',
            'levels' => 'trace,log',
            'categories' => 'system.db.CDbCommand',
        ],
    ],
]

Dialogue & Discussion