getContainer()->get(Psr\Log\LoggerInterface::class)); try { $app->run(); } catch (Error | Exception $e) { $logger = $app->getContainer()->get(Psr\Log\LoggerInterface::class); $logger->debug(Safe\json_encode(compact('_SERVER'))); $logger->error($e); throw $e; }