confetticode/laravel-log-mail
最新稳定版本:v0.1.0
Composer 安装命令:
composer require confetticode/laravel-log-mail
包简介
Laravel - Sending log records via mail channels
README 文档
README
Supported PHP 8.2+ and Laravel 11+
Installation
composer require confetticode/laravel-log-mail
Usage
Configure a mail channel.
<?php return [ // ... 'channels' => [ 'mail' => [ 'driver' => 'mail', 'mailer' => env('LOG_MAIL_MAILER'), 'name' => env('LOG_MAIL_NAME'), 'level' => env('LOG_MAIL_LEVEL'), 'bubble' => env('LOG_MAIL_BUBBLE'), 'from' => [ 'address' => env('LOG_MAIL_FROM_ADDRESS'), 'name' => env('LOG_MAIL_FROM_NAME'), ], 'to' => [ 'address' => env('LOG_MAIL_TO_ADDRESS'), 'name' => env('LOG_MAIL_TO_NAME'), ], ], ], // ... ];
Log an error via the mail channel.
<?php use Illuminate\Support\Facades\Log; try { new UndefinedClass; } catch (\Throwable $e) { Log::channel('mail')->error($e->getMessage(), ['exception' => $e]); }
Use the mail channel as a part of the log stack.
LOG_STACK=daily,mail
Contributing
Thank you for considering contributing to the Laravel Log Mail package!
The contribution guide can be found in the contributing documentation.
License (MIT)
The MIT License (MIT). Please see the License for more information.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-10-17