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@googlemail.com>2014-07-07 04:03:15 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-07-07 04:03:15 +0400
commit76e11c5b11806bc9130b90424eb2254aa8b061e6 (patch)
treeaa655ef48a0b680dfab6e32a19722c64034f90cb /core/Log.php
parente0308b0e93d30976a904649112b472c786bd44a3 (diff)
I would like to see why ipAnonymization is enabled locally but not on travis
Diffstat (limited to 'core/Log.php')
-rw-r--r--core/Log.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/core/Log.php b/core/Log.php
index 4660517f5a..6a9ebefc57 100644
--- a/core/Log.php
+++ b/core/Log.php
@@ -373,8 +373,21 @@ class Log extends Singleton
$this->currentLogLevel = $logLevel;
}
- public function customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message)
+ public function customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message, $addTrace = true)
{
+ if ($addTrace) {
+ $message = $message . "\n";
+ $backTrace = debug_backtrace();
+ $backTrace = array_slice($backTrace, 1, 2);
+
+ foreach ($backTrace as &$trace) {
+ if (!empty($trace['object'])) {
+ unset($trace['object']);
+ }
+ }
+ $message .= var_export($backTrace, 1);
+ }
+
if(!file_put_contents($this->logToFilePath, $message . "\n", FILE_APPEND)) {
$message = Filechecks::getErrorMessageMissingPermissions($this->logToFilePath);
throw new \Exception( $message );