Sentry
Installation
composer require friendsofhyperf/sentry
Publish config file
php bin/hyperf.php vendor:publish friendsofhyperf/sentry
Register exception handler
return [
'handler' => [
'http' => [
FriendsOfHyperf\Sentry\SentryExceptionHandler::class,
App\Exception\Handler\AppExceptionHandler::class,
],
],
];
Register logger handler
<?php
return [
'sentry' => [
'handler' => [
'class' => FriendsOfHyperf\Sentry\SentryHandler::class,
'constructor' => [
'level' => \Monolog\Logger::DEBUG,
],
],
'formatter' => [
'class' => \Monolog\Formatter\LineFormatter::class,
'constructor' => [
'format' => null,
'dateFormat' => null,
'allowInlineLineBreaks' => true,
]
],
],
];