It all started because I accidentally disabled Yii::$app->log section in one project
It took me half an hour to figure out why 2 different projects on the same dev environment were having different output in debug/db panel.
It's not a bug, but I think there could be some improvements in both documentation as well as src/views/default/panels/db/detail.php
What do I suggest?
Documentation should clearly state that 'traceLevel' => YII_DEBUG ? 3 : 0, must be set
Add below code into panels/db/detail.php
if (Yii::$app->log->traceLevel < 1) {
echo "<div class=\"callout callout-danger\">Check application configuration section ['log'] for <b>traceLevel</b></div>";
}
What steps will reproduce the problem?
Comment out / disable Yii::$app->log section in the config. <--- I did this by mistake
Set index.php as per installation document
defined('YII_DEBUG') or define('YII_DEBUG', true);
What is the expected result?
No errors, and no warnings
Expected trace level to be automatically set to 3
Documentation says: By default, the trace level is automatically set to 3 if Yii is running in debug mode, as determined by the presence of
the following line in your index.php file
What do you get instead?
I couldn't see/enjoy yii\debug\Module::traceLink feature of debug db panel
Yii::$app->log
section in one projectsrc/views/default/panels/db/detail.php
What do I suggest?
'traceLevel' => YII_DEBUG ? 3 : 0,
must be setpanels/db/detail.php
What steps will reproduce the problem?
Yii::$app->log
section in the config. <--- I did this by mistakeindex.php
as per installation documentWhat is the expected result?
trace level
to be automatically set to3
3
if Yii is running in debug mode, as determined by the presence of the following line in yourindex.php
fileWhat do you get instead?
yii\debug\Module::traceLink
feature of debug db panelAdditional info