jewdore/error-ding

laravel 将handler里面的错误消息发送到dingTalk

Installs: 2 965

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 2

Open Issues: 0

pkg:composer/jewdore/error-ding

2.4 2019-05-24 03:11 UTC

This package is not auto-updated.

Last update: 2025-10-26 11:55:17 UTC


README

laravel 将handler里面的错误消息发送到dingTalk

使用方法

推荐放在larave handler里面的report函数中,(最好是在shouldntReport后面) 以laravel5.5为例,加入您需要加告警到handler

if ($handler = ErrorDing::channel(配置文件路径默认'self.error_handler')) {
$handler->errorMsg($exception); }

配置文件

  • token dingTalk的机器人token
  • error_log 如果指定这个配置项,那么会把Exception的trace信息存储在这个文件里面
  • open 是否打开推送
  • env 只允许在env环境里面报警,默认是production