diff options
author | dizzy <diosmosis@users.noreply.github.com> | 2021-06-28 22:22:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-28 22:22:46 +0300 |
commit | 5a68eedc22515b6d3baa6ae975964c22aa7fe626 (patch) | |
tree | a1c9fc2006f267ea278ebeaa01b7f17bf7238815 /core | |
parent | f4b4af50d2a9710634cab4cd2e98d7adcd9cf45b (diff) |
Add log for record aggregation. (#17716)
Diffstat (limited to 'core')
-rw-r--r-- | core/ArchiveProcessor.php | 12 |
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(); |