Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ethercreative/yii2-slack-error-logger
Send errors (5xx) to a slack channel
https://github.com/ethercreative/yii2-slack-error-logger
Last synced: about 2 months ago
JSON representation
Send errors (5xx) to a slack channel
- Host: GitHub
- URL: https://github.com/ethercreative/yii2-slack-error-logger
- Owner: ethercreative
- License: mit
- Created: 2017-03-10T11:07:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-13T15:48:45.000Z (almost 8 years ago)
- Last Synced: 2024-04-26T09:45:51.318Z (8 months ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Yii2 Slack Error Logger
Send errors (5xx) to a slack channel
## Install
You can install the package using the Composer package manager. You can install it by running this command in your project root:
```sh
composer require ethercreative/yii2-slack-error-logger
```## Basic Usage
Add the class to your configuration file.
You will need to [create an incoming webhook](https://my.slack.com/services/new/incoming-webhook)
```php
// ...
'log' => [
// ...
'targets' => [
[
'class' => 'ethercreative\log\Error',
'levels' => ['error'],
'webhook' => 'https://hooks.slack.com/...',
'name' => 'The name of your project',
'username' => 'The username for the user',
'channel' => '#thechannel',
],
],
],
// ...
```