Skip to content

Commit

Permalink
Fixes #65: ErrorPage renders twice
Browse files Browse the repository at this point in the history
  • Loading branch information
dcentrica committed Jul 13, 2021
1 parent 1cad13e commit aea9a15
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ PhpTek\Sentry\Log\SentryLogger:
adaptor: '%$PhpTek\Sentry\Adaptor\SentryAdaptor'

SilverStripe\Core\Injector\Injector:
Psr\Log\LoggerInterface:
Monolog\Logger:
calls:
- [ pushHandler, [ '%$PhpTek\Sentry\Handler\SentryHandler' ]]
4 changes: 3 additions & 1 deletion src/Adaptor/SentryAdaptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Sentry\SentrySdk;
use SilverStripe\Core\Config\Configurable;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Core\Injector\Injectable;
use SilverStripe\Core\Environment as Env;
use PhpTek\Sentry\Adaptor\SentrySeverity;
use PhpTek\Sentry\Helper\SentryHelper;
Expand All @@ -27,7 +28,8 @@
*/
class SentryAdaptor
{
use Configurable;
use Configurable,
Injectable;

/**
* @var ClientInterface
Expand Down
4 changes: 2 additions & 2 deletions src/Handler/SentryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ class SentryHandler extends AbstractProcessingHandler
Configurable;

/**
* @config
* @var mixed int|null
*/
private static $log_level = null;

/**
* @var SentryAdaptor|null
* @var mixed SentryAdaptor|null
*/
private $adaptor = null;

Expand Down

0 comments on commit aea9a15

Please sign in to comment.