alexeevdv/yii2-log-slack

安装次数: 5,287

依赖项: 0

建议者: 0

安全性: 0

星星: 1

关注者: 2

分支: 2

公开问题: 1

类型:yii2-extension

1.0.1 2018-02-18 09:21 UTC

This package is auto-updated.

Last update: 2024-09-20 22:43:17 UTC


README

Build Status codecov

PHP 5.6 PHP 7.0 PHP 7.1 PHP 7.2 PHP 7.3 PHP 7.4

将日志消息发送到Slack webhook。

安装

安装此扩展的首选方式是通过 composer

运行以下命令之一:

$ php composer.phar require alexeevdv/yii2-log-slack "^1.0"

或者添加以下内容到你的 composer.json 文件的 require 部分:

"alexeevdv/yii2-log-slack": "^1.0"

配置

通过应用程序组件

//...
'components' => [
    //...
    'log' => [
        //...
        'targets' => [
            //...
            [
                'class' => alexeevdv\log\SlackTarget::class,
                'webhook' => 'https://your_webhook_link',
                // other optional params goes here
            ],
            //...
        ],
        //..
    ],
    //...
],
//...

支持的参数

有关支持参数的列表,请参阅 https://github.com/maknz/slack