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:
authorBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-23 12:32:34 +0400
committerBenaka Moorthi <benaka.moorthi@gmail.com>2013-09-23 12:32:34 +0400
commit019bdb782bf33bfadc1c1a254fcd128094d0ce7e (patch)
tree0294b422d8e6152807b5aa50b0ab669ae6cbad1c /core/Log.php
parentda38169ad193948602f9b4d6f93c1f77cacac344 (diff)
Tweaks.
Diffstat (limited to 'core/Log.php')
-rw-r--r--core/Log.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/core/Log.php b/core/Log.php
index 6533473bfa..787cc81e92 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -82,6 +82,11 @@ class Log
/**
* TODO
*/
+ private $loggingToScreen;
+
+ /**
+ * TODO
+ */
public function __construct()
{
$logConfig = Config::getInstance()->log;
@@ -103,6 +108,10 @@ class Log
if (!empty($writer)) {
$this->writers[] = $writer;
}
+
+ if ($writer == 'screen') {
+ $this->loggingToScreen = true;
+ }
}
}
@@ -207,6 +216,13 @@ class Log
foreach ($this->writers as $writer) {
$writer($level, $pluginName, $datetime, $message);
}
+
+ // errors are always printed to screen
+ if ($level == self::ERROR
+ && !$this->loggingToScreen
+ ) {
+ $this->logToScreen($this->formatMessage($level, $pluginName, $datetime, $message));
+ }
}
/**