marcopollacci/mezzio-sentrydelegator

用于连接 Mezzio 和 Sentry 的实用工具

1.0.1 2020-01-19 10:29 UTC

This package is auto-updated.

Last update: 2024-09-19 20:53:50 UTC


README

Build Status Maintainability Latest Stable Version Total Downloads License composer.lock

Average time to resolve an issue Percentage of issues still open

Mezzio 的 Sentry Delegator - Lamisas 框架

通过 Composer 安装

composer require marcopollacci/mezzio-sentrydelegator

使用方法

  1. 在配置文件中设置 sentry 令牌和 dsn(如果没有提供配置,则不向 Sentry 发送异常)。例如
return [
    'sentry' => [
        'dsn' => 'https://<your url>>/<your id>',
        'environment' => 'produzione' #optional
    ]
];
  1. 享受使用吧 :D!

在 try / catch 语句中的额外使用

代码示例

        try {
            throw new \Exception('something');
        }catch(\Exception $e){
            \Sentry\captureException($e);
            /* something else you want */
        }