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-10-01 06:23:18 +0300
committerGitHub <noreply@github.com>2019-10-01 06:23:18 +0300
commit42a62a21cb5c2df97e0b6fe64ecc2c5ea426f119 (patch)
tree3f5742d11026dfd9bc6866415630cc492e87f649 /plugins/Monolog/config/tracker.php
parent416697204ae953c4da6c2bfd9c70562021b4b1c8 (diff)
Replace some usages of Common::printDebug w/ use of logger (#13968)
* Start refactoring Common::printDebug(). * Make tracker debug statement error log. * Remove logger removal for tracker. * Fix test failure. * Add two more parent constructor calls. * Fix failing test
Diffstat (limited to 'plugins/Monolog/config/tracker.php')
-rw-r--r--plugins/Monolog/config/tracker.php16
1 files changed, 6 insertions, 10 deletions
diff --git a/plugins/Monolog/config/tracker.php b/plugins/Monolog/config/tracker.php
index 620101ff7a..bb7820f9f1 100644
--- a/plugins/Monolog/config/tracker.php
+++ b/plugins/Monolog/config/tracker.php
@@ -10,17 +10,13 @@ function isTrackerDebugEnabled(ContainerInterface $c)
return array(
- 'Psr\Log\LoggerInterface' => \DI\decorate(function ($previous, ContainerInterface $c) {
- if (isTrackerDebugEnabled($c)) {
- return $previous;
- } else {
- return new \Psr\Log\NullLogger();
- }
- }),
-
- 'log.handler.classes' => DI\decorate(function ($previous) {
- if (isset($previous['screen'])) {
+ 'log.handler.classes' => DI\decorate(function ($previous, ContainerInterface $c) {
+ if (isset($previous['screen'])
+ && isTrackerDebugEnabled($c)
+ ) {
$previous['screen'] = 'Piwik\Plugins\Monolog\Handler\EchoHandler';
+ } else {
+ unset($previous['screen']);
}
return $previous;