szymcode/sentry-substitute

此软件包最新版本(1.0.0)没有提供许可证信息。

旨在替换日常工作中使用的Sentry。

1.0.0 2024-02-07 21:30 UTC

This package is auto-updated.

Last update: 2024-09-22 21:26:10 UTC


README

旨在替换日常工作中使用的Sentry。处理Web应用中的错误并将它们转发到错误面板。 Packagist链接


🛠️ 安装

• 首先确保您已安装最新版本的 Composer

• 使用Composer在您的Laravel项目中安装包

composer require szymcode/sentry-substitute

❓ 使用方法

• 通过修改App/Exceptions/Handler.php文件,启用捕获异常并向错误面板报告

use szymcode\sentry_substitute\ErrorHandling;

public function register(): void
{
    $this->reportable(function (Throwable $e) {
        ErrorHandling::getErrorMessage($e);  // captures the error message and sends it to the /api/errors endpoint
    });
}