guanguans / 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、WPu
Fund package maintenance!
Wechat
Installs: 23 814
Dependents: 1
Suggesters: 0
Security: 0
Stars: 124
Watchers: 2
Forks: 11
Open Issues: 2
Requires
- php: >=7.4
- ext-json: *
- guanguans/notify: ^2.11
- illuminate/support: ^8.23 || ^9.0 || ^10.0 || ^11.0
Requires (Dev)
- brainmaestro/composer-git-hooks: ^2.8 || ^3.0
- driftingly/rector-laravel: ^1.2
- ergebnis/composer-normalize: ^2.43
- ergebnis/license: ^2.4
- ergebnis/php-cs-fixer-config: dev-main
- ergebnis/rector-rules: ^1.0
- guanguans/monorepo-builder-worker: ^1.4
- hyperf/composer-plugin: ^1.0
- icanhazstring/composer-unused: ^0.8
- maglnet/composer-require-checker: ^3.8 || ^4.0
- mockery/mockery: ^1.6
- orchestra/testbench: ^6.45 || ^7.0 || ^8.0 || ^9.0
- pestphp/pest: ^1.23 || ^2.0
- pestphp/pest-plugin-faker: ^1.0 || ^2.0
- pestphp/pest-plugin-laravel: ^1.2 || ^2.0
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^1.11
- phpstan/phpstan-deprecation-rules: ^1.2
- rector/rector: ^1.2
- dev-main
- 4.6.0
- 4.5.1
- 4.5.0
- 4.4.2
- 4.4.1
- 4.4.0
- 4.3.3
- 4.3.2
- 4.3.1
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 4.0.0-beta3
- 4.0.0-beta2
- 4.0.0-beta1
- 3.x-dev
- 3.8.4
- 3.8.3
- 3.8.2
- 3.8.1
- 3.8.0
- 3.7.0
- 3.6.1
- 3.6.0
- 3.5.3
- 3.5.2
- 3.5.1
- 3.5.0
- 3.4.2
- 3.4.1
- 3.4.0
- 3.3.2
- 3.3.1
- 3.3.0
- 3.2.3
- 3.2.2
- 3.2.1
- 3.2.0
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.2
- 3.0.1
- 3.0.0
- 3.0.0-rc2
- 3.0.0-rc1
- 3.0.0-beta1
- 2.x-dev
- v2.16.0
- v2.15.0
- v2.14.4
- v2.14.3
- v2.14.2
- v2.14.1
- v2.14.0
- v2.13.0
- v2.12.0
- v2.11.5
- v2.11.4
- v2.11.3
- v2.11.2
- v2.11.1
- v2.11.0
- v2.10.0
- v2.9.0
- v2.8.0
- v2.7.1
- v2.7.0
- v2.6.3
- v2.6.2
- v2.6.1
- v2.6.0
- v2.5.1
- v2.5.0
- v2.4.0
- v2.3.0
- v2.2.0
- v2.1.3
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- 1.x-dev
- v1.2.3
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.12
- v1.1.11
- v1.1.10
- v1.1.9
- v1.1.8
- v1.1.7
- v1.1.6
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- dev-dependabot/github_actions/codecov/codecov-action-5
- dev-issue-69-Laravel执行安装后post-autoload-dump报错
- dev-issue-67-企业微信的_EXCEPTION_NOTIFY_WEWORK_TOKEN_在哪里获取?
- dev-issue-66-Call_to_undefined_method_NunoMaduro_Collision_Adapters_Laravel_ExceptionHandler_reportable
- dev-issue-59-upgrade_dependencies_guanguans/notify_to_2_x
- dev-issue-55-vscode打开项目提示如下错误
This package is auto-updated.
Last update: 2024-11-14 21:25:19 UTC
README
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).
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
Requirement
- PHP >= 7.4
Installation
composer require guanguans/laravel-exception-notify --ansi -v
Configuration
Publish files(optional)
php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\ExceptionNotifyServiceProvider" --ansi -v
Apply for channel authentication and other information
- Notify
- Dump(For debugging exception messages)
- Log
Configure channels in the config/exception-notify.php
and .env
file
# 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
php artisan exception-notify:test --ansi -v
Notification examples
Skip report
Modify the boot
method in the app/Providers/AppServiceProvider.php
file
<?php use Guanguans\LaravelExceptionNotify\Facades\ExceptionNotify; use Illuminate\Support\Arr; public function boot(): void { ExceptionNotify::skipWhen(static fn (\Throwable $throwable) => 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 use Guanguans\LaravelExceptionNotify\Contracts\Channel; use Guanguans\LaravelExceptionNotify\Facades\ExceptionNotify; use Illuminate\Container\Container; public function boot(): void { ExceptionNotify::extend('YourChannelName', function (Container $container): Channel { return 'Instance of the `\Guanguans\LaravelExceptionNotify\Contracts\Channel`.'; }); }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
Thanks
License
The MIT License (MIT). Please see License File for more information.