Home > PHP Framework > YII > How to enable debugging mode in yii

How to enable debugging mode in yii

(*-*)浩
Release: 2019-12-04 12:00:31
Original
5485 people have browsed it

How to enable debugging mode in yii

# (Recommended learning: yii framework )

main.php
Copy after login

Open debugging Mode:

define('YII_DEBUG', true); //是否调试BUG,本地测试请打开
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL', 3);
Copy after login

Add log configuration:

'log' => array(
    'class' => 'CLogRouter',
    'routes' => array(
        array(
            'class' => 'CFileLogRoute',
            'levels' => 'error, warning',
        ),
        array(
            'class'=>'CWebLogRoute',
            'levels'=>'trace',//提示的级别
            'categories'=>'system.db.*',
        ),
    ),
),
Copy after login

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!

Related labels:
yii
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template