diff options
author | n-peugnet <n.peugnet@free.fr> | 2020-04-21 01:44:13 +0200 |
---|---|---|
committer | Vincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com> | 2020-04-21 14:56:53 +0200 |
commit | e5f59d39268b552c6b8416d5f0d8294ec19e26f3 (patch) | |
tree | 4e3b447077daf9cddf209c392348f5b81009c2ce /index.php | |
parent | 648c9a70684bba41ec9ba4890cafdc6950a407dd (diff) | |
download | wcms-e5f59d39268b552c6b8416d5f0d8294ec19e26f3.tar.gz wcms-e5f59d39268b552c6b8416d5f0d8294ec19e26f3.zip |
feat: add Logger class to log catched errors
Previously, if Sentry was not enabled, the Exceptions weren't
logged anywhere.
I expect you to use this class in the future @vincent-peugnet !
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,10 +1,13 @@ <?php +use Wcms\Logger; + session_start(); require('./vendor/autoload.php'); +Logger::init('w_error.log', 2); $app = new Wcms\Application(); $app->wakeup(); @@ -30,5 +33,6 @@ try { if (isreportingerrors()) { Sentry\captureException($e); } + Logger::exception($e, true); echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n"; } |