2022-11-09 15:22:58 -03:00
|
|
|
<?php
|
|
|
|
$app = require_once implode(DIRECTORY_SEPARATOR, [
|
|
|
|
dirname(__FILE__, 2),
|
|
|
|
'setup',
|
|
|
|
'app.php'
|
|
|
|
]);
|
2022-11-29 11:12:06 -03:00
|
|
|
Monolog\ErrorHandler::register($app->getContainer()->get(Psr\Log\LoggerInterface::class));
|
|
|
|
try {
|
|
|
|
$app->run();
|
|
|
|
} catch (Error | Exception $e) {
|
2022-12-01 14:22:13 -03:00
|
|
|
if (isset($_REQUEST)) {
|
|
|
|
$app->getContainer()->get(Psr\Log\LoggerInterface::class)->debug(json_encode(compact('_REQUEST')));
|
|
|
|
}
|
2022-11-29 11:12:06 -03:00
|
|
|
$app->getContainer()->get(Psr\Log\LoggerInterface::class)->error($e);
|
|
|
|
throw $e;
|
|
|
|
}
|