定制 webtoolsnz/yii2-slack 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

webtoolsnz/yii2-slack

Composer 安装命令:

composer require webtoolsnz/yii2-slack

包简介

Slack Integration for Yii LogTargets

README 文档

README

Scrutinizer Code Quality

Provides a Yii2 LogTarget implementation for slack incoming webhooks.

Installation

The preferred way to install this extension is through composer.

composer require webtoolsnz/yii2-slack

Configuration Example

You will need to create an incoming webhook and configure the webHookUrl setting appropriately.

...
'components' => [
        'log' => [
            'targets' => [
                [
                    'class' => 'webtoolsnz\slack\SlackTarget',
                    'levels' => ['error', 'warning'],
                    'webHookUrl' => 'https://your.webhook.url',
                    'except' => [
                        'yii\web\HttpException:404',
                        'yii\web\HttpException:403',
                    ],
                ],
            ],
        ],
    ],
...

Settings

Besides the the properties inherited from \yii\log\Target the following settings are also supported

  • webHookUrl: The generated URL for your incoming webhook
    • string
    • required
  • channel: the channel that messages will be sent to
    • string
    • default: the setting on the webhook
  • username: the username that messages will be sent from
    • string
    • default: Will be generated based on server name or application name (depending if web or console application)
  • icon: the icon messages will be sent with, either :emoji: or a URL to an image
    • string
    • default: :warning:
  • color: the color of the message attachment, can be one of good, warning, danger or any hex color code.
    • string
    • default: danger
  • showFullContext: if set to true all of the usual context variables will be included in the attachment
    • bool
    • default: false

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 15
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: proprietary
  • 更新时间: 2016-03-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固