tlingc/think-aliyunsls

This package is abandoned and no longer maintained. The author suggests using the devsdawn/think-aliyunsls package instead.

Aliyun sls log driver for thinkphp 6

v1.0.2 2022-09-12 01:37 UTC

This package is auto-updated.

Last update: 2022-09-21 10:56:41 UTC


README

ThinkPHP 6 阿里云日志服务日志驱动

安装

composer require devsdawn/think-aliyunsls

配置

config/log.php

// 默认日志记录通道
'default'      => 'aliyunsls',
// 日志通道列表
'channels'     => [
    'aliyunsls' => [
        // 日志记录方式
        'type' => 'Aliyunsls',
        // 阿里云 endpoint
        'endpoint' => 'http://cn-beijing.sls.aliyuncs.com/',
        // 阿里云 AccessKey ID
        'access_key_id' => '',
        // 阿里云 AccessKey Secret
        'access_key_secret' => '',
        // 项目名称
        'project' => '',
        // logstore 名称
        'logstore' => '',
        // source 标识
        'source' => '',
        // topic 标识
        'topic' => '',
        // 日志处理
        'processor' => null,
        // 关闭通道日志写入
        'close' => false,
        // 使用JSON格式记录
        'json' => true,
        // 是否实时写入
        'realtime_write' => false,
    ],
]

协议

MIT