yagas 2024-06-25 15:18:09 465次浏览 0条评论 0 0 0
  1. 把多个节点的debug信息聚合保存到统一的MongoDB中方便分析问题。
  2. 使用MongoDB可以存储更多的数据。

https://packagist.org/packages/yagas/yii2-debug4mongo

安装扩展:

composer require yagas/yii2-debug4mongo

配置扩展:

if (YII_ENV_DEV) {
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yagas\debug\Module',
        'logTarget' => [
            'class' => 'yagas\debug\LogTarget',
            'app_no' => 'localhost_001', // 为当前节点设定标识
        ],
        'percent' => 10, // 百分之十的几率清除历史数据(GC)
    ];
}
    没有找到数据。
您需要登录后才可以评论。登录 | 立即注册