getExceptionLevel($exception); $this->logException(__METHOD__, $exception, $level); } /** * Render an exception into an HTTP response. * * @param Request $request * @param Throwable $exception * @return JsonResponse|Response|\Symfony\Component\HttpFoundation\Response */ public function render($request, Throwable $exception) { return parent::render($request, $exception); } /** * @param Throwable $exception * @return string */ protected function getExceptionLevel(Throwable $exception): string { if (method_exists($exception, 'getLevel')) { return mb_strtolower($exception->getLevel()); } return LogsLevelsEnum::ERROR; } }