https://github.com/guanguans/laravel-exception-notify
Monitor exception and report to the notification channels(Dump、Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、Zulip).
https://github.com/guanguans/laravel-exception-notify
bark chanify discord error exception laravel monitor notification notifier notify pushdeer qq-bot slack telegram
Last synced: 20 days ago
JSON representation
Monitor exception and report to the notification channels(Dump、Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、PushMe、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、Zulip).
- Host: GitHub
- URL: https://github.com/guanguans/laravel-exception-notify
- Owner: guanguans
- License: mit
- Created: 2021-07-02T06:31:13.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T13:09:28.000Z (about 1 month ago)
- Last Synced: 2025-04-01T13:11:56.605Z (27 days ago)
- Topics: bark, chanify, discord, error, exception, laravel, monitor, notification, notifier, notify, pushdeer, qq-bot, slack, telegram
- Language: PHP
- Homepage:
- Size: 14.4 MB
- Stars: 131
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# laravel-exception-notify
> Monitor exception and report it to notification channels(Dump、Log、Mail、AnPush、Bark、Chanify、DingTalk、Discord、Gitter、GoogleChat、IGot、Lark、Mattermost、MicrosoftTeams、NowPush、Ntfy、Push、Pushback、PushBullet、PushDeer、Pushover、PushPlus、QQ、RocketChat、ServerChan、ShowdocPush、SimplePush、Slack、Telegram、WeWork、WPush、XiZhi、YiFengChuanHua、Zulip).
[](https://github.com/guanguans/laravel-exception-notify/actions)
[](https://github.com/guanguans/laravel-exception-notify/actions)
[](https://codecov.io/gh/guanguans/laravel-exception-notify)
[](https://packagist.org/packages/guanguans/laravel-exception-notify)
[](https://github.com/guanguans/laravel-exception-notify/releases)
[](https://packagist.org/packages/guanguans/laravel-exception-notify)
[](https://packagist.org/packages/guanguans/laravel-exception-notify)## Features
* Monitor exception and report it to notification channels
* Support for extending customized channels
* Support for notification rate limiting
* Support for customized data pipe
* Support for customized data collector## Related Links
* [https://github.com/guanguans/notify](https://github.com/guanguans/notify)
* [https://github.com/guanguans/yii-log-target](https://github.com/guanguans/yii-log-target)## Requirement
* PHP >= 8.0
## Installation
```bash
composer require guanguans/laravel-exception-notify --ansi -v
```## Configuration
### Publish files(optional)
```bash
php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\ExceptionNotifyServiceProvider" --ansi -v
```### Apply for channel authentication and other information
* [Notify](https://github.com/guanguans/notify#platform-support)
* Dump(For debugging exception messages)
* Log### Configure channels in the `config/exception-notify.php` and `.env` file
```dotenv
# EXCEPTION_NOTIFY_DEFAULTS=dingTalk,lark,mail,slack,telegram,...
EXCEPTION_NOTIFY_DEFAULTS=log,slack,weWork
EXCEPTION_NOTIFY_SLACK_WEBHOOK=https://hooks.slack.com/services/TPU9A9/B038KNUC0GY/6pKH3vfa3mjlUPcgLSjzR
EXCEPTION_NOTIFY_WEWORK_TOKEN=73a3d5a3-ceff-4da8-bcf3-ff5891778
```## Usage
### Test for exception notify
```shell
php artisan exception-notify:test --ansi -v
```### Notification examples
| discord | lark | mail |
|:----------------------------:|:----------------------:|:----------------------:|
|  |  |  |### Skip report
Modify the `boot` method in the `app/Providers/AppServiceProvider.php` file
```php
Arr::first(
[
\Symfony\Component\HttpKernel\Exception\HttpException::class,
\Illuminate\Http\Exceptions\HttpResponseException::class,
],
static fn (string $exception): bool => $throwable instanceof $exception
));
}
```### Custom channel
Modify the `boot` method in the `app/Providers/AppServiceProvider.php` file
```php