forked fromguanguans/laravel-exception-notify
- Notifications
You must be signed in to change notification settings - Fork0
Laravel 中异常监控报警通知(Bark、Chanify、钉钉群机器人、Discord、飞书群机器人、邮件、PushDeer、QQ 频道机器人、Server 酱、Slack、Telegram、企业微信群机器人、息知)。
License
NotificationsYou must be signed in to change notification settings
lyhiving/laravel-exception-notify
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Laravel 中异常监控报警通知(Bark、Chanify、钉钉群机器人、Discord、飞书群机器人、邮件、PushDeer、QQ 频道机器人、Server 酱、Slack、Telegram、企业微信群机器人、息知)。
- 监控发送 laravel 应用异常
- 支持多种通道(Bark、Chanify、钉钉群机器人、Discord、飞书群机器人、邮件、PushDeer、QQ 频道机器人、Server 酱、Slack、Telegram、企业微信群机器人、息知)
- 支持扩展自定义通道
- 支持自定义数据收集器
- 支持自定义数据转换器
- 支持通知速率限制(相同异常生产环境默认每 5 分钟通知 1 次)
- PHP >= 7.2
- laravel >= 5.5
composer require guanguans/laravel-exception-notify -vvv
php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\ExceptionNotifyServiceProvider"将以下代码段添加到bootstrap/app.php 文件中的Register Service Providers 部分下:
$app->register(\Guanguans\LaravelExceptionNotify\ExceptionNotifyServiceProvider::class);$app->boot(\Guanguans\LaravelExceptionNotify\ExceptionNotifyServiceProvider::class);
config/exception-notify.php
.env 文件中配置
EXCEPTION_NOTIFY_DEFAULT_CHANNEL=dingTalkEXCEPTION_NOTIFY_DINGTALK_KEYWORD=keywordEXCEPTION_NOTIFY_DINGTALK_TOKEN=c44fec1ddaa8a833156efb77b7865d62ae13775418030d94dEXCEPTION_NOTIFY_DINGTALK_SECRET=SECc32bb7345c0f73da2b9786f0f7dd5083bd768a29b82
publicfunctionreport(Exception$e){// 默认通道 \ExceptionNotifier::reportIf($this->shouldReport($e),$e);// 指定通道 \ExceptionNotifier::onChannel('dingTalk','mail')->reportIf($this->shouldReport($e),$e);parent::report($e);}
app/Providers/AppServiceProvider.php 的boot 方法中添加
publicfunctionboot(){// 扩展自定义通道 \ExceptionNotifier::extend('YourChannel',function (\Illuminate\Contracts\Container\Container$container){// 返回 \Guanguans\LaravelExceptionNotify\Contracts\Channel 的实例 });}
composertest请参阅CHANGELOG 获取最近有关更改的更多信息。
请参阅CONTRIBUTING 有关详细信息。
请查看我们的安全政策了解如何报告安全漏洞。
MIT 许可证(MIT)。有关更多信息,请参见协议文件。
About
Laravel 中异常监控报警通知(Bark、Chanify、钉钉群机器人、Discord、飞书群机器人、邮件、PushDeer、QQ 频道机器人、Server 酱、Slack、Telegram、企业微信群机器人、息知)。
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- PHP100.0%

