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
path: root/core
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
parente0308b0e93d30976a904649112b472c786bd44a3 (diff)
I would like to see why ipAnonymization is enabled locally but not on travis
Diffstat (limited to 'core')
-rw-r--r--core/Common.php16
-rw-r--r--core/Log.php15
-rw-r--r--core/Tracker/Visit.php5
3 files changed, 14 insertions, 22 deletions
diff --git a/core/Common.php b/core/Common.php
index ea91831f4d..64bf6926a1 100644
--- a/core/Common.php
+++ b/core/Common.php
@@ -1081,22 +1081,6 @@ class Common
static public function printDebug($info = '')
{
- if (is_object($info)) {
- $info = var_export($info, true);
- }
-
- if (is_array($info) || is_object($info)) {
- $info = Common::sanitizeInputValues($info);
- $out = var_export($info, true);
- foreach (explode("\n", $out) as $line) {
- Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($line);
- }
- } else {
- foreach (explode("\n", $info) as $line) {
- Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt(htmlspecialchars($line, ENT_QUOTES));
- }
- }
- return;
if (isset($GLOBALS['PIWIK_TRACKER_DEBUG']) && $GLOBALS['PIWIK_TRACKER_DEBUG']) {
if (is_object($info)) {
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 );
diff --git a/core/Tracker/Visit.php b/core/Tracker/Visit.php
index 036031bb83..c391c0484d 100644
--- a/core/Tracker/Visit.php
+++ b/core/Tracker/Visit.php
@@ -12,7 +12,6 @@ namespace Piwik\Tracker;
use Piwik\Common;
use Piwik\Config;
use Piwik\IP;
-use Piwik\Log;
use Piwik\Piwik;
use Piwik\Plugin\Dimension\VisitDimension;
use Piwik\Tracker;
@@ -84,8 +83,6 @@ class Visit implements VisitInterface
// the IP is needed by isExcluded() and GoalManager->recordGoals()
$this->visitorInfo['location_ip'] = $this->request->getIp();
- Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt('Handle Visit' . $this->request->getIp());
-
$excluded = new VisitExcluded($this->request, $this->visitorInfo['location_ip']);
if ($excluded->isExcluded()) {
return;
@@ -101,8 +98,6 @@ class Visit implements VisitInterface
*/
Piwik::postEvent('Tracker.setVisitorIp', array(&$this->visitorInfo['location_ip']));
- Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt('Handle Not Excluded Visit' . $this->visitorInfo['location_ip']);
-
$this->visitorCustomVariables = $this->request->getCustomVariables($scope = 'visit');
if (!empty($this->visitorCustomVariables)) {
Common::printDebug("Visit level Custom Variables: ");