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-03 11:42:26 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-07-03 11:42:26 +0400
commit7e0d0d30ecf63079930c18de43e8712090e8e282 (patch)
treeef070daa132d46efcb7df4db74fbd1b319ca19aa /plugins/PrivacyManager
parent33c496542b77ab36f00fb20f63a49c3414f28929 (diff)
log more info during test, looks like it has to do with anonymizer or so
Diffstat (limited to 'plugins/PrivacyManager')
-rw-r--r--plugins/PrivacyManager/IPAnonymizer.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/PrivacyManager/IPAnonymizer.php b/plugins/PrivacyManager/IPAnonymizer.php
index 837cd96496..1663d1fd44 100644
--- a/plugins/PrivacyManager/IPAnonymizer.php
+++ b/plugins/PrivacyManager/IPAnonymizer.php
@@ -10,6 +10,7 @@ namespace Piwik\Plugins\PrivacyManager;
use Piwik\Common;
use Piwik\IP;
+use Piwik\Log;
/**
* Anonymize visitor IP addresses to comply with the privacy laws/guidelines in countries, such as Germany.
@@ -53,6 +54,9 @@ class IPAnonymizer
public function setVisitorIpAddress(&$ip)
{
if (!$this->isActive()) {
+ $message = "Visitor IP was _not_ anonymized: ". IP::N2P($ip);
+ Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message);
+
Common::printDebug("Visitor IP was _not_ anonymized: ". IP::N2P($ip));
return;
}
@@ -62,6 +66,11 @@ class IPAnonymizer
$privacyConfig = new Config();
$ip = self::applyIPMask($ip, $privacyConfig->ipAddressMaskLength);
+
+
+ $message = "Visitor IP (was: ". IP::N2P($originalIp) .") has been anonymized: ". IP::N2P($ip) . ' with length ' . $privacyConfig->ipAddressMaskLength;
+ Log::getInstance()->customLogToFileForDebuggingIfYouStillSeeThisHereRemoveIt($message);
+
Common::printDebug("Visitor IP (was: ". IP::N2P($originalIp) .") has been anonymized: ". IP::N2P($ip));
}