# (Recommended learning: yii framework )
main.php
Open debugging Mode:
define('YII_DEBUG', true); //是否调试BUG,本地测试请打开 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
Add log configuration:
'log' => array( 'class' => 'CLogRouter', 'routes' => array( array( 'class' => 'CFileLogRoute', 'levels' => 'error, warning', ), array( 'class'=>'CWebLogRoute', 'levels'=>'trace',//提示的级别 'categories'=>'system.db.*', ), ), ),
The above is the detailed content of How to enable debugging mode in yii. For more information, please follow other related articles on the PHP Chinese website!