jdavidbakr/laravel-sns-error-notification
Composer 安装命令:
composer require jdavidbakr/laravel-sns-error-notification
包简介
Sends a notification via SNS when there is an exception
README 文档
README
This package is a simple extension of the Laravel Exception Handler that sends a notification via AWS SNS whenever there is an error, with helpful information like the URL that was called and the stack trace. The notification is cached so that it only sends one notice per unique error message every 24 hours, and only fires if the application is not in debug mode (so you aren't innundated with error messages while working on your project).
You can also enable writing to a database table, with automatic purging after a certain timeframe.
Install
Via Composer
$ composer require jdavidbakr/laravel-sns-error-notification
Add the service provider to your config/app.php file:
jdavidbakr\LaravelSNSErrorNotification\LaravelSNSErrorNotificationServiceProvider::class,
If you haven't already set up to use AWS, you will need to install the service provider:
Aws\Laravel\AwsServiceProvider::class
as well as the Facade in the 'aliases' array:
'AWS' => Aws\Laravel\AwsFacade::class,
Install the config file
php artisan vendor:publish
This inserts a config file at config/sns-error-notification.php. You must set the SNS topic and subject in there. Also note that you will need to configure the config/aws.php file as needed to give access to the SNS topic.
Install the migrations
php artisan migrate
This installs the tables needed to store the exceptions in the database.
Usage
To use, you will need to change the app/Exceptions/Handler.php class to extend \jdavidbakr\LaravelSNSErrorNotification\ErrorNotifier instead of \Illuminate\Foundation\Exceptions\Handler. The easiest way is to remove this line:
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
and replace it with this:
use jdavidbakr\LaravelSNSErrorNotification\ErrorNotifier as ExceptionHandler;
Testing
$ phpunit
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email me@jdavidbaker.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
jdavidbakr/laravel-sns-error-notification 适用场景与选型建议
jdavidbakr/laravel-sns-error-notification 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20.45k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2016 年 06 月 21 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「jdavidbakr」 「laravel-sns-error-notification」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 jdavidbakr/laravel-sns-error-notification 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 jdavidbakr/laravel-sns-error-notification 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 jdavidbakr/laravel-sns-error-notification 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Logs and tracks all outgoing emails from Laravel
Adds 'REPLACE' and 'INSERT IGNORE' query capability to eloquent models
A script that will clean up expired cache files if the system is using the files cache system
Logs and tracks all outgoing emails from Laravel
A script that will clean up expired cache files if the system is using the files cache system
Service Provider to add the Swift ThrottlerPlugin to outgoing mail.
统计信息
- 总下载量: 20.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-06-21