freemancontingent / laravellogflare
按计划检查日志,当发现错误时会发送电子邮件警报。保持领先,快速响应重要应用程序的问题。
v1.1
2016-10-20 14:32 UTC
Requires
- php: ^5.3.3 || ^7.0
- laravel/framework: ^5.2
This package is not auto-updated.
Last update: 2024-09-18 20:14:44 UTC
README
按计划检查日志,当发现错误时会发送电子邮件警报。保持领先,快速响应重要应用程序的问题。
安装
您可以通过Composer使用以下命令安装此包:
composer require freemancontingent/laravellogflare
您还必须安装此服务提供者。
// config/app.php 'providers' => [ ... Freemancontingent\Laravellogflare\FrllflareServiceProvider::class, ... ];
要发布配置文件到app/config/logflare.php
以及自定义电子邮件模板到resources/views/freemancontingent/logflare/email.blade.php
,请运行以下命令:
php artisan vendor:publish --provider="Freemancontingent\Laravellogflare\FrllflareServiceProvider"
这将将在您的配置目录中发布一个名为app/config/logflare.php
的文件,内容如下:
return [ /* |-------------------------------------------------------------------------- | Default Monolog Level check |-------------------------------------------------------------------------- | | Here you may specify the default Monolog levels that should be used | by the Laravel Log Flare. | | Supported: debug, info, notice, warning, error, critical, alert, emergency | */ 'level' => ['error','critical'], /* |-------------------------------------------------------------------------- | Support email address |-------------------------------------------------------------------------- | | Email address to receive the report. | | */ 'support_email' => '', /* |-------------------------------------------------------------------------- | Support email name |-------------------------------------------------------------------------- | | Email name | | */ 'support_email_name' => '', /* |-------------------------------------------------------------------------- | Email subject |-------------------------------------------------------------------------- | | Flare email subject | */ 'subject' => '', /* |-------------------------------------------------------------------------- | Log viewer link |-------------------------------------------------------------------------- | | Add inside the email template the link to view all log. | | */ 'log_viewer_link' => '', /* |-------------------------------------------------------------------------- | Print info logs |-------------------------------------------------------------------------- | | Print info logs when the function is called. | | Supported: true,false | */ 'log' => true, /* |-------------------------------------------------------------------------- | Use custom email template |-------------------------------------------------------------------------- | | Use custom email template inside freemancontingent/logsflare/ | | Supported: true, false | */ 'custom_email_template' => false, ];
用法
在您安装了此包并填写了配置文件中的值后,使用此包将变得非常简单。以下所有示例都使用外观。不要忘记在您的计划文件app/Console/Kernel.php
顶部导入它。
use Freemancontingent\Laravellogflare\Flare; ... $schedule->call(function(){ $flare = new Flare(); $flare->firing(); })->cron('00 07 * * *'); ...
贡献
请参阅CONTRIBUTING以获取详细信息。
致谢
许可证
Log Flare是开源软件,根据MIT许可证授权。