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框架中使用
- laravel 版本号大于 5.7+
- 修改项目中
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' // 日志名称 ] ], ] ];
- 修改
.env配置文件LOG_CHANNEL值为aliyun-log
LOG_CHANNEL=aliyun-log
其他使用
。
统计信息
- 总下载量: 12.54k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-26