Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2019-02-18 17:02:29 +0300
committerGitHub <noreply@github.com>2019-02-18 17:02:29 +0300
commit8d3fe62389469347f7ebc551ee36f4527655b804 (patch)
treebeea4c5ba26e3969e47441f948c152b471bf20a9 /core/Development.php
parent99d42f5b8ca81f5481635c0cbea794d4b7de783b (diff)
Enable fingers crossed handler via INI config and show backtrace in logs/archive api output (#13923)
* Add config to use FringersCrossedHandler (untested) * Get to work in different contexts. * Add changelog note. * Make sure more exceptions make it to the logs, make backtrace include previous exceptions, do not use screen writer if in cli mode, always print backtrace if in CLI mode and archivephp triggered. * Add log capturing handler. * Remove options from global.ini.php sibnce they may be temporary. * Add UI test triggering an error w/ the screen handler. * Add some more log statements, ignore logs in screen writer, replace part of message in ExceptionToTextProcessor instead of whole message. * Add missing license. * Update changelog, move new item to 3.9 * Fixing some integration tests. * Fix another unit test. * One more test fix. * Try to get rid of xss testing warning. * Try again to get rid of warning. * Try again to get rid of warning. * Try again to get rid of warning.
Diffstat (limited to 'core/Development.php')
-rw-r--r--core/Development.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/core/Development.php b/core/Development.php
index 3b44eba71d..4660f83d9e 100644
--- a/core/Development.php
+++ b/core/Development.php
@@ -10,6 +10,8 @@
namespace Piwik;
use Exception;
+use Piwik\Container\StaticContainer;
+use Psr\Log\LoggerInterface;
/**
* Development related checks and tools. You can enable/disable development using `./console development:enable` and
@@ -150,8 +152,11 @@ class Development
$message .= ' (This error is only shown in development mode)';
if (SettingsServer::isTrackerApiRequest()
- || Common::isPhpCliMode()) {
- Log::error($message);
+ || Common::isPhpCliMode()
+ ) {
+ StaticContainer::get(LoggerInterface::class)->error($message, [
+ 'ignoreInScreenWriter' => true,
+ ]);
} else {
throw new Exception($message);
}