laravel-exception-notify - 反对多种通道的 laravel 异样监控告诉(钉钉群机器人、飞书群机器人、Server 酱、企业微信群机器人、息知)。

性能

  • 监控发送 laravel 利用异样
  • 反对多种通道(钉钉群机器人、飞书群机器人、Server 酱、企业微信群机器人、息知)
  • 自定义发送的异样信息数据

源码

  • https://github.com/guanguans/laravel-exception-notify

相干我的项目

  • https://github.com/guanguans/notify
  • https://github.com/guanguans/yii-log-target

环境要求

  • laravel >= 5.5

装置

$ composer require guanguans/laravel-exception-notify -vvv

配置

公布服务

$ php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\ExceptionNotifyServiceProvider"

申请通道 token 等信息

  • 钉钉群机器人
  • 飞书群机器人
  • Server 酱
  • 企业微信群机器人
  • 息知

配置文件中配置 token 等信息

config/exception-notify.php

应用

批改 app/Exceptions/Handler.php 文件中的 report 办法

public function report(Exception $exception){    // 增加的代码    $this->shouldReport($exception) and \ExceptionNotifier::report($exception);    // // 或者    // $this->shouldReport($exception) and app('exception.notifier')->report($exception);    // // 或者    // $this->shouldReport($exception) and \Guanguans\LaravelExceptionNotify\Facades\Notifier::report($exception);    parent::report($exception);}

告诉后果