Hi All,
I am trying to disable the db profiler on my production systems and I constantly get the below profiling information on my logs:
2015-06-25 10:13:54 [172.17.42.1][-][-][info][yii\db\Connection::open] Opening DB connection: mysql:host=172.18.64.142;dbname=live
2015-06-25 10:13:54 [172.17.42.1][-][-][profile begin][yii\db\Connection::open] Opening DB connection: mysql:host=172.18.64.142;dbname=live
2015-06-25 10:13:54 [172.17.42.1][-][-][profile end][yii\db\Connection::open] Opening DB connection: mysql:host=172.18.64.142;dbname=live
2015-06-25 10:13:54 [172.17.42.1][-][-][info][yii\db\Command::query] SELECT * FROM metrics_micro
WHERE metrics_id
=‘3’
2015-06-25 10:13:54 [172.17.42.1][-][-][profile begin][yii\db\Command::query] SELECT * FROM metrics_micro
WHERE metrics_id
=‘3’
2015-06-25 10:13:54 [172.17.42.1][-][-][profile end][yii\db\Command::query] SELECT * FROM metrics_micro
WHERE metrics_id
=‘3’
My logs are :
‘log’ => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'logFile' => '@logs/app.log',
'logVars' => [],
],
[
'class' => 'yii\log\FileTarget',
'logFile' => Yii::getAlias('@logs').'/cron.log',
'logVars' => [],
'categories' => ['cronjobs']
],
],
],
Even if I set YII_DEBUG to FALSE the profiling information still appears.
Is there a way to disable the db profiling?
-S.