diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-11-04 07:52:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-04 07:52:00 +0300 |
commit | 6b12f37eb630d25dffa13e315b894abda80ed5af (patch) | |
tree | cadb29189f71915124cffb350e9b6fbf786825dc /core/Plugin/Visualization.php | |
parent | 0739af50f6bf35a747e110a2f1178e17e8c21fa2 (diff) |
require PIWIK_PRINT_ERROR_BACKTRACE for exception backtraces in logs (#16640)
* require PIWIK_PRINT_ERROR_BACKTRACE for exception backtraces in logs
* consolidate uses of getTraceAsString to use single method where possible which always checks if should print stacktrace
* replace sensitive values and add some tests
* apply more review comments
* another tweak
* remove backtrace omitted error
* fix test
* fix test for travis
* fix test
Diffstat (limited to 'core/Plugin/Visualization.php')
-rw-r--r-- | core/Plugin/Visualization.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php index bc484b8fd9..064c012b91 100644 --- a/core/Plugin/Visualization.php +++ b/core/Plugin/Visualization.php @@ -27,6 +27,7 @@ use Piwik\Period; use Piwik\Piwik; use Piwik\Plugins\API\API as ApiApi; use Piwik\Plugins\API\Filter\DataComparisonFilter; +use Piwik\Plugins\Monolog\Processor\ExceptionToTextProcessor; use Piwik\Plugins\PrivacyManager\PrivacyManager; use Piwik\SettingsPiwik; use Piwik\View; @@ -205,10 +206,7 @@ class Visualization extends ViewDataTable 'ignoreInScreenWriter' => true, ]); - $message = $e->getMessage(); - if (\Piwik_ShouldPrintBackTraceWithMessage()) { - $message .= "\n" . $e->getTraceAsString(); - } + $message = ExceptionToTextProcessor::getMessageAndWholeBacktrace($e); $loadingError = array('message' => $message); } |