update Piwik to version 2.16 (fixes #91)
This commit is contained in:
parent
296343bf3b
commit
d885a4baa9
5833 changed files with 418860 additions and 226988 deletions
37
www/analytics/plugins/Monolog/config/tracker.php
Normal file
37
www/analytics/plugins/Monolog/config/tracker.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
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) {
|
||||
if (isTrackerDebugEnabled($c)) {
|
||||
return $c->get('Monolog\Logger');
|
||||
} else {
|
||||
return new \Psr\Log\NullLogger();
|
||||
}
|
||||
},
|
||||
|
||||
'log.handler.classes' => DI\decorate(function ($previous) {
|
||||
if (isset($previous['screen'])) {
|
||||
$previous['screen'] = 'Piwik\Plugins\Monolog\Handler\EchoHandler';
|
||||
}
|
||||
|
||||
return $previous;
|
||||
}),
|
||||
|
||||
'log.level' => DI\decorate(function ($previous, ContainerInterface $c) {
|
||||
if (isTrackerDebugEnabled($c)) {
|
||||
return \Monolog\Logger::DEBUG;
|
||||
}
|
||||
|
||||
return $previous;
|
||||
})
|
||||
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue