Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TheLifeProject/bugsnag-for-statamic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: intrepidws/bugsnag-for-statamic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Apr 1, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d230494 View commit details
  2. Update composer.json

    intrepidws authored Apr 1, 2021
    Copy the full SHA
    0811cda View commit details
Showing with 7 additions and 5 deletions.
  1. +5 −3 BugsnagLogger.php
  2. +2 −2 composer.json
8 changes: 5 additions & 3 deletions BugsnagLogger.php
Original file line number Diff line number Diff line change
@@ -16,13 +16,15 @@ class BugsnagLogger extends \Statamic\Exceptions\Handler
public function report(Exception $e)
{
// New up the bugsnag client if needed.
if( empty($this->bugsnag) AND $apikey = $this->getConfig('bugsnag_apikey') )
if (empty($this->bugsnag) AND $apikey = $this->getConfig('bugsnag_apikey')) {
$this->bugsnag = \Bugsnag\Client::make( $apikey );
}

if( ! empty($this->bugsnag) )
if (! empty($this->bugsnag) && $this->shouldReport($e)) {
$this->bugsnag->notifyException($e);
}

parent::report($e);
}

}
}
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "the-life-project/bugsnag-logger",
"name": "intrepidws/bugsnag-logger",
"require": {
"bugsnag/bugsnag": "^3.0"
}
}
}