razonyang/yii2-log-target-db
Composer 安装命令:
composer require razonyang/yii2-log-target-db
包简介
Yii2 enhanced database log target
关键字:
README 文档
README
Because the built-in database log target can not figure out the context of same request, especially in the case of concurrency, so that the log is very confusing, it is hard to diagnose errors.
According this problem, what this extension do is that record the request ID via dechex($_SERVER['REQUEST_TIME_FLOAT'] * 1000000).
Installation
composer require razonyang/yii2-log-target-db
Usage
return [ // console configuration 'controllerMap' => [ 'migrate' => [ 'migrationPath' => [ // ... '@yii/log/migrations/', ], 'migrationNamespaces' => [ // ... 'RazonYang\Yii2\Log\Db\Migration', ], ], ], // common/web/console configuration 'components' => [ 'log' => [ 'targets' => [ 'db' => [ 'class' => \RazonYang\Yii2\Log\Db\Target::class, 'levels' => ['error', 'warning'], 'db' => 'db', 'logTable' => '{{%log}}', ], ], ], ], ];
then:
$ yii migrate
统计信息
- 总下载量: 3.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2019-08-14