17 lines
430 B
PHP
17 lines
430 B
PHP
|
<?php
|
||
|
use Psr\Log\LoggerInterface;
|
||
|
|
||
|
$app = require_once implode(DIRECTORY_SEPARATOR, [
|
||
|
dirname(__FILE__, 2),
|
||
|
'setup',
|
||
|
'app.php'
|
||
|
]);
|
||
|
Monolog\ErrorHandler::register($app->getContainer()->get(LoggerInterface::class));
|
||
|
try {
|
||
|
$app->run();
|
||
|
} catch (Exception $e) {
|
||
|
$app->getContainer()->get(LoggerInterface::class)->alert($e);
|
||
|
} catch (Error $e) {
|
||
|
$app->getContainer()->get(LoggerInterface::class)->error($e);
|
||
|
}
|