diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-11-27 08:45:08 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-11-28 01:58:56 +0300 |
commit | d98e21e2a1934eef1bd9f6c241588e33ddbedcdb (patch) | |
tree | 2ab27fc6320d4831570fb3abcb0c74272f84c9c7 /config | |
parent | e00732e1ea29900860671a5b022d4450377776f2 (diff) |
Logger refactoring, 1st step: separate config from logic
Diffstat (limited to 'config')
-rw-r--r-- | config/global.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/global.php b/config/global.php index cb3bf82996..359519cab9 100644 --- a/config/global.php +++ b/config/global.php @@ -20,4 +20,14 @@ return array( return $root . '/tmp' . $instanceId; }), + + // Log + 'Piwik\Log' => DI\factory(array('Piwik\Log\LoggerFactory', 'createLogger')), + 'log.format' => DI\factory(function (ContainerInterface $c) { + if ($c->has('old_config.log.string_message_format')) { + return $c->get('old_config.log.string_message_format'); + } + return '%level% %tag%[%datetime%] %message%'; + }), + ); |