承接 cblink/monolog-handler 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cblink/monolog-handler

最新稳定版本:v3.0.0

Composer 安装命令:

composer require cblink/monolog-handler

包简介

monolog aliyun handler

README 文档

README

安装

composer require cblink/monolog-handler

支持的Handler列表

  • 阿里云log

在laravel框架中使用

  1. laravel 版本号大于 5.7+
  2. 修改项目中 app/logging.php文件,channels中添加aliyun driver,示例如下
// 将
return [
    // ...
    'channels' => [
        //... 
        
        // 添加此项
        'aliyun-log' => [
            'driver' => 'monolog',
            'level' => 'debug',
            'handler' => Cblink\Monolog\Handler\AliyunLogHandler::class,
            'handler_with' => [
                'access_id' =>  '阿里云控制台access_key_id',
                'access_key' => '阿里云控制台access_key_secret',
                'endpoint' => 'cn-shenzhen',    // 节点,无需填写 log.aliyuncs.com
                'projectName' => 'laravel-project',     // 日志服务中的项目名称
                'logName' => 'service-wechat'       // 日志名称
            ]
        ],
    ]   
];
  1. 修改.env配置文件LOG_CHANNEL值为aliyun-log
LOG_CHANNEL=aliyun-log

其他使用

统计信息

  • 总下载量: 12.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-26