KO
|
EN
gitlite — search
Search
#python
#java
#python3
#arduino
#golang
#machine-learning
#rust
#html
#flask
#javascript
#seismology
#nodejs
yii2-slack-log
★ 20
Open GitHub ↗
Pretty Slack log target for Yii 2
Download README (.md)
Explore Similar Repositories
Alignment-fab-bar
:
materialup中的设计
dbplotR
:
Shiny app allowing users to produce interactive graphs directly from a database connection
apache-cloudstack-java-client
:
This project facilitates the integration of Java applications with Apache CloudStack through its API.
klb
:
Nash library to automate cloud infrastructure management
isaac-dotcms-advancedsearch
:
No description available.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
yii2-slack-log
?
Download (.md)
# Slack log target for Yii 2 Pretty [Slack](https://slack.com) log target for Yii 2.  [](https://scrutinizer-ci.com/g/sergeymakinen/yii2-slack-log) [](https://travis-ci.org/sergeymakinen/yii2-slack-log) [](https://codecov.io/gh/sergeymakinen/yii2-slack-log) [](https://insight.sensiolabs.com/projects/ba92b44d-afd3-463d-9d61-95ac316537af) [](https://packagist.org/packages/sergeymakinen/yii2-slack-log) [](https://packagist.org/packages/sergeymakinen/yii2-slack-log) [](https://raw.githubusercontent.com/sergeymakinen/yii2-slack-log/master/LICENSE) ## Installation The preferred way to install this extension is through [composer](https://getcomposer.org/download/). Either run ```bash composer require "sergeymakinen/yii2-slack-log:^2.0" ``` or add ```json "sergeymakinen/yii2-slack-log": "^2.0" ``` to the require section of your `composer.json` file. ## Usage First set up an [incoming webhook integration](https://my.slack.com/services/new/incoming-webhook/) in your Slack team and obtain a token. It should look like `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`. Then set the following Yii 2 configuration parameters: ```php 'components' => [ 'log' => [ 'targets' => [ [ 'class' => 'sergeymakinen\yii\slacklog\Target', 'webhookUrl' => 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX', ], ], ], ], ``` Sample config: ```php 'components' => [ 'log' => [ 'targets' => [ [ 'class' => 'sergeymakinen\yii\slacklog\Target', 'levels' => ['error'], 'except' => [ 'yii\web\HttpException:*', ], 'enabled' => YII_ENV_PROD, 'webhookUrl' => 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX', 'username' => 'Fire Alarm Bot', 'iconEmoji' => ':poop:', ], ], ], ], ```