Closed notflip closed 3 years ago
I'm looking into ways of outputting more information when a 404 happens, I'm using the following code at the moment
$app->addBodyParsingMiddleware(); $app->addRoutingMiddleware(); // Error Middleware $loggerFactory = $app->getContainer()->get(\App\Factory\LoggerFactory::class); $logger = $loggerFactory->addFileHandler('error.log')->createInstance('error'); $app->addErrorMiddleware(true, true, true, $logger);
So I'm wondering, the file in this repository, src/Handler/DefaultErrorHandler.php, how can I make sure that this one is used instead of the default in Slim? Thank you!
src/Handler/DefaultErrorHandler.php
You can also find more examples here: https://odan.github.io/2020/05/27/slim4-error-handling.html
I'm looking into ways of outputting more information when a 404 happens, I'm using the following code at the moment
So I'm wondering, the file in this repository,
src/Handler/DefaultErrorHandler.php
, how can I make sure that this one is used instead of the default in Slim? Thank you!Edit Closed, this is clearly defined in the docs but for some reason I missed it