guanguans/laravel-exception-notify
Fork: 11 Star: 124 (更新于 2024-11-03 22:59:11)
license: MIT
Language: PHP .
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).
最后发布版本: 4.6.0 ( 2024-08-16 16:04:59)
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).
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
discord | lark | |
---|---|---|
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.
最近版本更新:(数据更新于 2024-10-12 21:31:01)
2024-08-16 16:04:59 4.6.0
2024-05-17 16:09:10 4.5.1
2024-05-17 15:48:33 4.5.0
2024-05-13 16:33:42 3.8.4
2024-05-13 16:24:06 4.4.2
2024-05-12 15:58:33 4.4.1
2024-05-11 15:50:42 4.4.0
2024-05-10 17:03:47 4.3.3
2024-05-09 17:50:51 4.3.2
2024-05-09 12:08:17 4.3.1
主题(topics):
bark, chanify, discord, error, exception, laravel, monitor, notification, notifier, notify, pushdeer, qq-bot, slack, telegram
guanguans/laravel-exception-notify同语言 PHP最近更新仓库
2024-11-01 18:37:36 schmittjoh/JMSSerializerBundle
2024-10-31 21:37:53 filamentphp/filament
2024-10-28 00:16:41 symfony/var-dumper
2024-10-28 00:11:41 symfony/symfony
2024-10-11 23:44:26 coollabsio/coolify
2024-10-11 03:27:29 odan/slim4-skeleton