public function report(Exception $e) { if ($this->shouldntReport($e)) { return; } try { $logger = app('Psr\\Log\\LoggerInterface'); } catch (Exception $ex) { throw $e; // throw the original exception } $logger->error($e); }
/** * @return mixed */ public function getReporter() : callable { $default = function (Exception $e) { parent::report($e); }; return $this->reporter ?: $default; }