rpr/swoft-sentry

Sentry log component for Swoft2.0

2.0.2 2019-10-18 03:03 UTC

This package is auto-updated.

Last update: 2022-05-18 09:08:22 UTC


README

Sentry log component for Swoft2.0

Usage:

install

composer require rpr/sowft-sentry

sentry log definition 编辑 app/bean.php 添加如下内容定义

    'sentryHandler' => [
        'class'     => \Gaodeng\SwoftSentry\SentryHandler::class,
        'dsn'       => 'YOUR SENTRY DSN',
        'formatter' => '${lineFormatter}',
        'curlMethod'=> 'co', //curlMethod可以是co,async和exec
        'levels'    => 'error,info', //2.0.1支持直接逗号分隔的字符串
    ],

    'logger' => [
        'flushRequest' => false,
        'enable'       => true,
        'json'         => true,
        'handlers'     => [
            '${sentryHandler}',   //添加handler
            //...  其他handler
        ],
    ],