diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-01 04:07:26 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-12-01 04:07:26 +0300 |
commit | 65c96bb562d1da6d1163aa1ad70ddde37c7f7af5 (patch) | |
tree | 2f29bb1cd46652437aac237414070bcccbeee91a /core/ExceptionHandler.php | |
parent | 1d5aedc49ab2e5d07c10e600fcd5a12a1f9ce378 (diff) |
#6622 Logger refactoring: formatting messages is now done through Formatters instead of events
Diffstat (limited to 'core/ExceptionHandler.php')
-rw-r--r-- | core/ExceptionHandler.php | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/core/ExceptionHandler.php b/core/ExceptionHandler.php index dfadcc2763..9bbb5a23ac 100644 --- a/core/ExceptionHandler.php +++ b/core/ExceptionHandler.php @@ -8,10 +8,6 @@ */ namespace Piwik; -use Piwik\Log\Formatter\ExceptionHtmlFormatter; -use Piwik\Log\Formatter\ExceptionTextFormatter; -use Piwik\Plugin; - /** * Contains Piwik's uncaught exception handler and log file formatting for exception * instances. @@ -27,25 +23,9 @@ class ExceptionHandler public static function setUp() { - Piwik::addAction('Log.formatFileMessage', array('Piwik\ExceptionHandler', 'formatFileAndDBLogMessage')); - Piwik::addAction('Log.formatDatabaseMessage', array('Piwik\ExceptionHandler', 'formatFileAndDBLogMessage')); - Piwik::addAction('Log.formatScreenMessage', array('Piwik\ExceptionHandler', 'formatScreenMessage')); - set_exception_handler(array('Piwik\ExceptionHandler', 'logException')); } - public static function formatFileAndDBLogMessage(&$message, $level, $tag, $datetime, Log $log) - { - $formatter = new ExceptionTextFormatter(); - $message = $formatter->format($message, $level, $tag, $datetime, $log); - } - - public static function formatScreenMessage(&$message, $level, $tag, $datetime, $log) - { - $formatter = new ExceptionHtmlFormatter(); - $message = $formatter->format($message, $level, $tag, $datetime, $log); - } - public static function logException(\Exception $exception) { Log::error($exception); |