ethercreative/yii2-slack-error-logger

Send errors (5xx) to a slack channel

0.0.6 2017-03-13 15:48 UTC

This package is not auto-updated.

Last update: 2024-03-16 23:36:52 UTC


README

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:

composer require ethercreative/yii2-slack-error-logger

Basic Usage

Add the class to your configuration file.

You will need to create an incoming webhook

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