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:
authordizzy <diosmosis@users.noreply.github.com>2021-06-28 22:22:46 +0300
committerGitHub <noreply@github.com>2021-06-28 22:22:46 +0300
commit5a68eedc22515b6d3baa6ae975964c22aa7fe626 (patch)
treea1c9fc2006f267ea278ebeaa01b7f17bf7238815 /core
parentf4b4af50d2a9710634cab4cd2e98d7adcd9cf45b (diff)
Add log for record aggregation. (#17716)
Diffstat (limited to 'core')
-rw-r--r--core/ArchiveProcessor.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index c79b5709ac..b231d57eb4 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -12,12 +12,14 @@ use Exception;
use Piwik\Archive\DataTableFactory;
use Piwik\ArchiveProcessor\Parameters;
use Piwik\ArchiveProcessor\Rules;
+use Piwik\Container\StaticContainer;
use Piwik\DataAccess\ArchiveWriter;
use Piwik\DataAccess\LogAggregator;
use Piwik\DataTable\Manager;
use Piwik\DataTable\Map;
use Piwik\DataTable\Row;
use Piwik\Segment\SegmentExpression;
+use Psr\Log\LoggerInterface;
/**
* Used by {@link Piwik\Plugin\Archiver} instances to insert and aggregate archive data.
@@ -202,14 +204,24 @@ class ArchiveProcessor
$columnsToRenameAfterAggregation = null,
$countRowsRecursive = true)
{
+ /** @var LoggerInterface $logger */
+ $logger = StaticContainer::get(LoggerInterface::class);
+
if (!is_array($recordNames)) {
$recordNames = array($recordNames);
}
+ $archiveDescription = $this->params . '';
+
$nameToCount = array();
foreach ($recordNames as $recordName) {
$latestUsedTableId = Manager::getInstance()->getMostRecentTableId();
+ $logger->debug("aggregating record {record} [archive = {archive}]", [
+ 'record' => $recordName,
+ 'archive' => $archiveDescription,
+ ]);
+
$table = $this->aggregateDataTableRecord($recordName, $columnsAggregationOperation, $columnsToRenameAfterAggregation);
$nameToCount[$recordName]['level0'] = $table->getRowsCount();