From 6c11ad21c86a3bac8111d5a4c08bc635984d2129 Mon Sep 17 00:00:00 2001 From: Benaka Moorthi Date: Sun, 6 Oct 2013 16:47:11 -0400 Subject: Removed Piwik::log and replace with calls to Log::... functions. Also changed logging level on travis. --- core/Profiler.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/Profiler.php') diff --git a/core/Profiler.php b/core/Profiler.php index b79bc068ce..4ad407f3ee 100644 --- a/core/Profiler.php +++ b/core/Profiler.php @@ -10,6 +10,8 @@ */ namespace Piwik; +use Piwik\Log; + /** * Class Profiler helps with measuring memory, and profiling the database. * To enable set in your config.ini.php @@ -86,7 +88,7 @@ class Profiler $str .= '(Average query length: ' . round($totalTime / $queryCount, 3) . ' seconds)'; $str .= '
Queries per second: ' . round($queryCount / $totalTime, 1); $str .= '
Longest query length: ' . round($longestTime, 3) . " seconds ($longestQuery)"; - Piwik::log($str); + Log::debug($str); self::getSqlProfilingQueryBreakdownOutput($infoIndexedByQuery); } @@ -135,7 +137,7 @@ class Profiler { $totalTime = self::getDbElapsedSecs(); $queryCount = Profiler::getQueryCount(); - Piwik::log(sprintf("Total queries = %d (total sql time = %.2fs)", $queryCount, $totalTime)); + Log::debug(sprintf("Total queries = %d (total sql time = %.2fs)", $queryCount, $totalTime)); } /** @@ -179,6 +181,6 @@ class Profiler $query = preg_replace('/([\t\n\r ]+)/', ' ', $query); $output .= "Executed $count time" . ($count == 1 ? '' : 's') . " in " . $timeMs . "ms $avgTimeString
\t$query
"; } - Piwik::log($output); + Log::debug($output); } } \ No newline at end of file -- cgit v1.2.3