alextar/yii2-firephp-query-profiler

使用FirePHP进行数据库查询分析

安装次数: 1,277

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

类型:yii2-extension

dev-master / 0.1.x-dev 2015-04-08 12:48 UTC

This package is not auto-updated.

Last update: 2024-09-28 17:49:09 UTC


README

YII2的FirePHP日志目标

如果不起作用,尝试在index.php中添加"ob_start()"

用法

composer.json

"require": {
    	"codeexpert/yii2-firephp": "0.1.*@dev"
},

配置文件

$config = [
    'components' => [
        'log' => [
            'targets' => [
                'firephp' => [
                    'class' => 'codeexpert\log\FirePHPTarget',
                ]
            ],
        ],
    ],
];

任何地方

\Yii::info('Hello, I am info message', 'test1');
\Yii::warning('Hello, I am warning message', 'test2');
\Yii::error('Hello, I am error message', 'test3');
\Yii::info(array('a'=>'b', 'c'=>'d'), 'array test');