Verified Commit 10f78814 authored by Artemis's avatar Artemis 🐱

Added sentry error logging

parent 140e3b8b
......@@ -19,7 +19,8 @@
"matthiasmullie/minify": "^1.3",
"scrivo/highlight.php": "v9.18.1.1",
"ext-readline": "*",
"vlucas/phpdotenv": "^4.1"
"vlucas/phpdotenv": "^4.1",
"sentry/sdk": "2.1.0"
},
"license": "Apache-2.0",
"authors": [
......
This diff is collapsed.
......@@ -17,6 +17,7 @@ if (file_exists(__DIR__ . '/.env')) {
}
return [
'sentry-dsn' => getenv('SENTRY_DSN'),
'auth_token' => getenv('AUTH_TOKEN'),
'db' => getenv('DB_DSN'),
'resources' => [
......
......@@ -36,6 +36,11 @@ require_once(ROOT . '/vendor/autoload.php');
use App\Runner;
$config = require_once(ROOT . '/config.php');
if (is_string($config['sentry-dsn'])) {
Sentry\init(['dsn' => $config['sentry-dsn']]);
}
$routes = require_once(ROOT . '/routes.php');
(new Runner($config))->http($routes);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment