📈 Add GlitchTip

Signed-off-by: Luke Tainton <luke@tainton.uk>
This commit is contained in:
2020-08-05 18:24:40 +01:00
parent baeeca06cf
commit c7ca1d751f
548 changed files with 74474 additions and 4 deletions

View File

@@ -7,6 +7,12 @@ require_once __DIR__ . "/../vendor/autoload.php";
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . "/..");
$dotenv->load();
// GlitchTip Logs
Sentry\init([
'dsn' => 'https://06f1b7e10e04409686f8ddad61f218ec@logs.tainton.uk/2',
'release' => $_ENV['APP_VERSION']
]);
// Session
session_start();

View File

@@ -13,7 +13,8 @@
$user_tickets_sql->setFetchMode(PDO::FETCH_ASSOC);
$user_tickets_result = $user_tickets_sql->fetchAll();
} catch (PDOException $e) {
echo("Error: " . $e->getMessage());
Sentry\captureException($e);
// echo("Error: " . $e->getMessage());
}
// Get tickets user has subscribed to
@@ -25,7 +26,8 @@
$sub_tickets_sql->setFetchMode(PDO::FETCH_ASSOC);
$sub_tickets_result = $sub_tickets_sql->fetchAll();
} catch (PDOException $e) {
echo("Error: " . $e->getMessage());
Sentry\captureException($e);
// echo("Error: " . $e->getMessage());
}
$user_tickets_sub = 0; // Force 'no subbed tickets' msg until the code works
@@ -41,7 +43,8 @@
$result = $sql->fetchAll();
$tkt = $result[0];
} catch (PDOException $e) {
echo("Error: " . $e->getMessage());
Sentry\captureException($e);
// echo("Error: " . $e->getMessage());
}
return $tkt;
}
@@ -56,7 +59,8 @@
$result = $sql->fetchAll();
$usr = $result[0]['given_name'] . " " . $result[0]['family_name'];
} catch (PDOException $e) {
echo("Error: " . $e->getMessage());
Sentry\captureException($e);
// echo("Error: " . $e->getMessage());
}
return $usr;
}