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:
authorMatthieu Napoli <matthieu@mnapoli.fr>2014-12-01 04:07:26 +0300
committerMatthieu Napoli <matthieu@mnapoli.fr>2014-12-01 04:07:26 +0300
commit65c96bb562d1da6d1163aa1ad70ddde37c7f7af5 (patch)
tree2f29bb1cd46652437aac237414070bcccbeee91a /core/Log.php
parent1d5aedc49ab2e5d07c10e600fcd5a12a1f9ce378 (diff)
#6622 Logger refactoring: formatting messages is now done through Formatters instead of events
Diffstat (limited to 'core/Log.php')
-rw-r--r--core/Log.php26
1 files changed, 2 insertions, 24 deletions
diff --git a/core/Log.php b/core/Log.php
index 52123d3593..2892c4406d 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -10,7 +10,8 @@ namespace Piwik;
use Piwik\Container\StaticContainer;
use Piwik\Db;
-use Piwik\Log\Backend\ScreenBackend;
+use Piwik\Log\Backend\StdOutBackend;
+use Piwik\Log\LoggerFactory;
/**
* Logging utility class.
@@ -308,16 +309,6 @@ class Log extends Singleton
foreach ($this->writers as $writer) {
call_user_func($writer, $level, $tag, $datetime, $message, $this);
}
-
- // TODO this hack should be removed
- if ($level == self::ERROR) {
- $screenBackend = new ScreenBackend($this->logMessageFormat);
- $message = $screenBackend->getMessageFormattedScreen($level, $tag, $datetime, $message, $this);
- $this->writeErrorToStandardErrorOutput($message);
- if (!isset($this->writers['screen'])) {
- echo $message;
- }
- }
}
private static function logMessage($level, $message, $sprintfParams)
@@ -358,19 +349,6 @@ class Log extends Singleton
}
/**
- * @param $message
- */
- private function writeErrorToStandardErrorOutput($message)
- {
- if (defined('PIWIK_TEST_MODE')) {
- // do not log on stderr during tests (prevent display of errors in CI output)
- return;
- }
- $fe = fopen('php://stderr', 'w');
- fwrite($fe, $message);
- }
-
- /**
* Returns the name of the plugin/class that triggered the log.
*
* @return string