From 756fb5886b85345d366ec0c26bf68f228d639f1e Mon Sep 17 00:00:00 2001 From: Matthieu Napoli Date: Mon, 22 Dec 2014 11:43:50 +1300 Subject: Replaced usage of Log::verbose() with Log::debug() The "verbose" level doesn't exist in PSR-3, the lowest one is "debug". --- core/Archive.php | 4 ++-- core/ArchiveProcessor/Parameters.php | 2 +- core/ArchiveProcessor/PluginsArchiver.php | 4 ++-- core/Db.php | 4 ++-- core/FrontController.php | 2 +- core/Plugin/Manager.php | 2 +- core/View.php | 2 +- tests/PHPUnit/TestingEnvironment.php | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/core/Archive.php b/core/Archive.php index b407465a45..34cd44ba2f 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -599,14 +599,14 @@ class Archive // we already know there are no stats for this period // we add one day to make sure we don't miss the day of the website creation if ($twoDaysAfterPeriod->isEarlier($site->getCreationDate())) { - Log::verbose("Archive site %s, %s (%s) skipped, archive is before the website was created.", + Log::debug("Archive site %s, %s (%s) skipped, archive is before the website was created.", $idSite, $period->getLabel(), $period->getPrettyString()); continue; } // if the starting date is in the future we know there is no visiidsite = ?t if ($twoDaysBeforePeriod->isLater($today)) { - Log::verbose("Archive site %s, %s (%s) skipped, archive is after today.", + Log::debug("Archive site %s, %s (%s) skipped, archive is after today.", $idSite, $period->getLabel(), $period->getPrettyString()); continue; } diff --git a/core/ArchiveProcessor/Parameters.php b/core/ArchiveProcessor/Parameters.php index 1528d8210c..e51edb26a8 100644 --- a/core/ArchiveProcessor/Parameters.php +++ b/core/ArchiveProcessor/Parameters.php @@ -180,7 +180,7 @@ class Parameters if ($isTemporary) { $temporary = 'temporary archive'; } - Log::verbose( + Log::debug( "%s archive, idSite = %d (%s), segment '%s', report = '%s', UTC datetime [%s -> %s]", $this->getPeriod()->getLabel(), $this->getSite()->getId(), diff --git a/core/ArchiveProcessor/PluginsArchiver.php b/core/ArchiveProcessor/PluginsArchiver.php index 5deae5d350..7487128728 100644 --- a/core/ArchiveProcessor/PluginsArchiver.php +++ b/core/ArchiveProcessor/PluginsArchiver.php @@ -97,7 +97,7 @@ class PluginsArchiver $archiver = new $archiverClass($this->archiveProcessor); if (!$archiver->isEnabled()) { - Log::verbose("PluginsArchiver::%s: Skipping archiving for plugin '%s'.", __FUNCTION__, $pluginName); + Log::debug("PluginsArchiver::%s: Skipping archiving for plugin '%s'.", __FUNCTION__, $pluginName); continue; } @@ -120,7 +120,7 @@ class PluginsArchiver $pluginName ); } else { - Log::verbose("PluginsArchiver::%s: Not archiving reports for plugin '%s'.", __FUNCTION__, $pluginName); + Log::debug("PluginsArchiver::%s: Not archiving reports for plugin '%s'.", __FUNCTION__, $pluginName); } Manager::getInstance()->deleteAll($latestUsedTableId); diff --git a/core/Db.php b/core/Db.php index 66aef40222..b781032d21 100644 --- a/core/Db.php +++ b/core/Db.php @@ -710,7 +710,7 @@ class Db private static function logSql($functionName, $sql, $parameters = array()) { - // NOTE: at the moment we dont log bind in order to avoid sensitive information leaks - Log::verbose("Db::%s() executing SQL: %s", $functionName, $sql); + // NOTE: at the moment we don't log parameters in order to avoid sensitive information leaks + Log::debug("Db::%s() executing SQL: %s", $functionName, $sql); } } diff --git a/core/FrontController.php b/core/FrontController.php index 90b9db2fa5..58ac217905 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -229,7 +229,7 @@ class FrontController extends Singleton Profiler::printQueryCount(); } } catch (Exception $e) { - Log::verbose($e); + Log::debug($e); } } diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index bca24d8b5a..2224586ee4 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -430,7 +430,7 @@ class Manager extends Singleton */ public function installLoadedPlugins() { - Log::verbose("Loaded plugins: " . implode(", ", array_keys($this->getLoadedPlugins()))); + Log::debug("Loaded plugins: " . implode(", ", array_keys($this->getLoadedPlugins()))); $messages = array(); foreach ($this->getLoadedPlugins() as $plugin) { try { diff --git a/core/View.php b/core/View.php index 6200a23113..9a31220731 100644 --- a/core/View.php +++ b/core/View.php @@ -232,7 +232,7 @@ class View implements ViewInterface $user = APIUsersManager::getInstance()->getUser($this->userLogin); $this->userAlias = $user['alias']; } catch (Exception $e) { - Log::verbose($e); + Log::debug($e); // can fail, for example at installation (no plugin loaded yet) } diff --git a/tests/PHPUnit/TestingEnvironment.php b/tests/PHPUnit/TestingEnvironment.php index 9f31dfd0ed..c9dd9478cf 100644 --- a/tests/PHPUnit/TestingEnvironment.php +++ b/tests/PHPUnit/TestingEnvironment.php @@ -89,7 +89,7 @@ class Piwik_TestingEnvironment if (isset($_SERVER['QUERY_STRING']) && !$this->dontUseTestConfig ) { - @\Piwik\Log::verbose("Test Environment Variables for (%s):\n%s", $_SERVER['QUERY_STRING'], print_r($this->behaviorOverrideProperties, true)); + @\Piwik\Log::debug("Test Environment Variables for (%s):\n%s", $_SERVER['QUERY_STRING'], print_r($this->behaviorOverrideProperties, true)); } } catch (Exception $ex) { // ignore -- cgit v1.2.3