ethercreative / yii2-slack-error-logger
将错误(5xx)发送到Slack频道
0.0.6
2017-03-13 15:48 UTC
Requires
- maknz/slack: ^1.7
This package is not auto-updated.
Last update: 2024-09-15 01:56:07 UTC
README
将错误(5xx)发送到Slack频道
安装
您可以使用Composer包管理器安装此包。您可以在项目根目录运行以下命令进行安装
composer require ethercreative/yii2-slack-error-logger
基本用法
将类添加到您的配置文件中。
您需要 创建一个入站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', ], ], ], // ...