YII页面显示trace

修改protected/config/main.php

        'db'=>array(
            'connectionString' => 'mysql:host=localhost;dbname=test',
            'emulatePrepare' => true,
            'username' => 'root',
            'password' => 'root',
            'charset' => 'utf8',
                      /*
                       * 下面是调试信息,显示执行的数据库操作
                       */
                       'enableProfiling'=>YII_DEBUG, 
                      'enableParamLogging'=>YII_DEBUG,
        ),
'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				
				array(
					'class'=>'CWebLogRoute',
                                        'levels'=>'trace', 
                                        'categories'=>'system.db.*', 
				),
				
			),

  

posted @ 2013-12-02 11:39  天生我豺  阅读(1717)  评论(0编辑  收藏  举报