diff options
author | mattab <matthieu.aubry@gmail.com> | 2015-03-19 10:42:10 +0300 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2015-03-19 10:42:10 +0300 |
commit | 61bda75429cca3a3bfa24e889c8117bc1ef1a49d (patch) | |
tree | 64b77f983a9f497177fcdbc063d4c39ae0cd58c8 | |
parent | 13523fa494bf35e949009c5e2e31559afe321573 (diff) |
Better logging in core:archive command
-rw-r--r-- | core/CronArchive.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/CronArchive.php b/core/CronArchive.php index 3f84b5de78..50716ea756 100644 --- a/core/CronArchive.php +++ b/core/CronArchive.php @@ -743,12 +743,18 @@ class CronArchive return true; } - private function getSegmentsForSite($idSite) + private function getSegmentsForSite($idSite, $period) { $segmentsAllSites = $this->segments; $segmentsThisSite = SettingsPiwik::getKnownSegmentsToArchiveForSite($idSite); if (!empty($segmentsThisSite)) { - $this->log("Will pre-process the following " . count($segmentsThisSite) . " Segments for this website (id = $idSite): " . implode(", ", $segmentsThisSite)); + $this->log(sprintf( + "Will pre-process for website id = %s, %s period, the following %d segments: { %s } ", + $idSite, + $period, + count($segmentsThisSite), + implode(", ", $segmentsThisSite) + )); } $segments = array_unique(array_merge($segmentsAllSites, $segmentsThisSite)); return $segments; @@ -782,7 +788,7 @@ class CronArchive $urls[] = $url; } - foreach ($this->getSegmentsForSite($idSite) as $segment) { + foreach ($this->getSegmentsForSite($idSite, $period) as $segment) { $dateParamForSegment = $this->segmentArchivingRequestUrlProvider->getUrlParameterDateString($idSite, $period, $date, $segment); $urlWithSegment = $this->getVisitsRequestUrl($idSite, $period, $dateParamForSegment, $segment); |