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:
authorThomas Steur <thomas.steur@gmail.com>2015-08-19 15:15:11 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-08-19 15:15:11 +0300
commitbaec74598a8a57af403c35af40e7ea46570307d6 (patch)
treef4a675d82c594cfe2bdd04211703828186bc651b /plugins/Monolog/config
parent496bbbd15239c6cfa160679b2aa51cefa55b6fdb (diff)
fix a system test
Diffstat (limited to 'plugins/Monolog/config')
-rw-r--r--plugins/Monolog/config/tracker.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/Monolog/config/tracker.php b/plugins/Monolog/config/tracker.php
index 22e06bb1f1..c9d0044b35 100644
--- a/plugins/Monolog/config/tracker.php
+++ b/plugins/Monolog/config/tracker.php
@@ -2,11 +2,16 @@
use Interop\Container\ContainerInterface;
+function isTrackerDebugEnabled(ContainerInterface $c)
+{
+ $trackerDebug = $c->get("ini.Tracker.debug");
+ return ($trackerDebug == 1 || !empty($GLOBALS['PIWIK_TRACKER_DEBUG']));
+}
+
return array(
'Psr\Log\LoggerInterface' => function (ContainerInterface $c) {
- $trackerDebug = $c->get("ini.Tracker.debug");
- if ($trackerDebug == 1 || !empty($GLOBALS['PIWIK_TRACKER_DEBUG'])) {
+ if (isTrackerDebugEnabled($c)) {
return $c->get('Monolog\Logger');
} else {
return new \Psr\Log\NullLogger();
@@ -21,8 +26,12 @@ return array(
return $previous;
}),
- 'log.level' => DI\factory(function (ContainerInterface $c) {
- return \Monolog\Logger::DEBUG;
+ 'log.level' => DI\decorate(function ($previous, ContainerInterface $c) {
+ if (isTrackerDebugEnabled($c)) {
+ return \Monolog\Logger::DEBUG;
+ }
+
+ return $previous;
})
);