承接 crazyit/laravel-error-mailer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

crazyit/laravel-error-mailer

Composer 安装命令:

composer require crazyit/laravel-error-mailer

包简介

Report errors by mail while ignoring repeating ones.

README 文档

README

Package to report laravel errors by email with throttling and deduplication. Fork of adwiv/laravel-error-mailer that is working fine with laravel 5.3+.

Installation

  1. Require this package with composer using the following command:
composer require crazyit/laravel-error-mailer
  1. Run the migration to create the error_logs table.
php artisan migrate
  1. Add the following keys to .env file
# Required Key
ERROR_MAILER_TO = "hello@example.com,admin@example.com" # Comma separated list of email addresses
# Optional Keys
ERROR_MAILER_FROM = "errors@example.com" # Mail sender, if not defined defaults to config setting
ERROR_MAILER_REPEAT_AFTER = 300   # Time in seconds for which same error will not be reported again
ERROR_MAILER_HOURLY_LIMIT = 10    # Maximum number of error mails that will be sent in an hour
  1. Configure config/logging.php. The package automatically adds a logging channel named error-mailer.

The simplest way to use it is to add it the stack channel.

    'channels' => [
        'stack' => [
            'driver' => 'stack',
            'channels' => ['single', 'error-mailer'], #<-- Add here
            'ignore_exceptions' => false,
        ],
        ...
     ],

Thats all. Any errors should now be reported to all the email addresses listed in ERROR_MAILER_TO environment option.

Troubleshooting

If mails are not being recieived, please check:

  1. Mail sending is configured correctly and you are able to send other mails without any issues.
  2. The ERROR_MAILER_TO variable is defined in .env file and has valid email addresses (without spaces)
  3. The mail queue is being processed correctly
  4. Check the laravel.log for any reported issues.

统计信息

  • 总下载量: 16
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-06-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固