2017 © Pedro Peláez
 

yii2-extension yii2-slack

Slack Integration for Yii LogTargets

image

webtoolsnz/yii2-slack

Slack Integration for Yii LogTargets

  • Wednesday, May 17, 2017
  • by badams
  • Repository
  • 6 Watchers
  • 1 Stars
  • 88 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 40 % Grown

The README.md

Slack LogTarget for Yii2

Scrutinizer Code Quality, (*1)

Provides a Yii2 LogTarget implementation for slack incoming webhooks., (*2)

Installation

The preferred way to install this extension is through composer., (*3)

composer require webtoolsnz/yii2-slack, (*4)

Configuration Example

You will need to create an incoming webhook and configure the webHookUrl setting appropriately., (*5)

...
'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, (*6)

  • 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

The Versions

17/05 2017

dev-master

9999999-dev https://github.com/webtoolsnz/yii2-slack

Slack Integration for Yii LogTargets

  Sources   Download

proprietary

The Requires

 

The Development Requires

component yii2 slack

17/05 2017

0.1.3

0.1.3.0 https://github.com/webtoolsnz/yii2-slack

Slack Integration for Yii LogTargets

  Sources   Download

proprietary

The Requires

 

The Development Requires

component yii2 slack

14/08 2015

0.1.2

0.1.2.0 https://github.com/webtoolsnz/yii2-slack

Slack Integration for Yii LogTargets

  Sources   Download

proprietary

The Requires

 

The Development Requires

component yii2 slack

12/07 2015

0.1.1

0.1.1.0 https://github.com/webtoolsnz/yii2-slack

Slack Integration for Yii LogTargets

  Sources   Download

proprietary

The Requires

 

The Development Requires

component yii2 slack