ailose/exception-alert

errors alert for developers;

v1.0.5 2019-03-14 02:09 UTC

This package is auto-updated.

Last update: 2024-04-14 19:04:35 UTC


README

介绍

进行监控和提醒操作

要求

  • php版本:>=7.0
  • laravel版本: Laravel5.5+

安装

composer require ailose/exception-alert

在laravel项目中使用

安装成功后执行

php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider"

会自动将ding.php添加到您项目的配置文件当中

相关配置

钉钉启用开关

(可选)默认为开启

DING_ENABLED=true

钉钉的推送token

DING_TOKEN=you-push-token

Inspire And Thanks

wowiwj/ding-notice

publish the config file:

php artisan vendor:publish --provider="DingNotice\DingNoticeServiceProvider"

配置

config/ding.php

        'DING_SIMPLE' => env('DING_SIMPLE'),
        'DING_TITLE' => env('DING_TITLE'),
        'DING_WORKERS' => env('DING_WORKERS'),

.env

#dingding

DING_ENABLED=true
DING_TOKEN=your token
DING_TIME_OUT=2.0
DING_SIMPLE=simple  #(or normal)
DING_WORKERS=phone numbers #(155xxx,156xxx 多个号码逗号隔开)   

app/Exceptions/Handler.php 添加

 public function report(Exception $exception)
    {
        ExceptionAlertHelper::notify($exception);
        parent::report($exception);
    }