Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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',
],
],
],
// ...
```