美文网首页
Yii trace debug info setting

Yii trace debug info setting

作者: lookphp | 来源:发表于2019-05-08 20:17 被阅读0次

    在main.php文件中,设置log

      'log' => array(
                        'class'  => 'CLogRouter' ,
                        'routes' => array(
                            array(
                                'class'  => 'CFileLogRoute' ,
                                'levels' => 'error, warning,trace,info'
                            ) ,
                            // the following to show log messages on web pages
                            array(
                                'class'   => 'CWebLogRoute' ,
                                'enabled' => YII_DEBUG  //如果
                            ) ,
                        )
                    ),
    

    If you don’t define YII_DEBUG, Yii will do it in YiiBase.php:

    There’s a minor gotcha there since YII_DEBUG is always defined in yiibase like this

    defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,false);

    and this test, placed anywhere after the line in the index call to

    Yii::createWebApplication($config)->run();

    will always show YII_DEBUG as defined, no matter that it is defined by define(‘YII_DEBUG’,false);

    相关文章

      网友评论

          本文标题:Yii trace debug info setting

          本文链接:https://www.haomeiwen.com/subject/ozzvoqtx.html