IndexInvalidationLogger (optional)
https://github.com/magesuite/index-invalidation-logger
The module logs index invalidations along with respective stacktrace in order to gain more knowledge about index invalidations that are triggered automatically.
Installation
This module is optional.
composer require "creativestyle/magesuite-index-invalidation-logger" ^1.0.0
Admin settings
In Stores -> Configuration -> Advanced -> System
the following module’s settings can be found:
Index Invalidation Debugger Settings
Field | Optiona | Comment |
---|---|---|
Enable Logging | Yes/No | Enables logging all index invalidation along with stacktraces. |
Logging retention period | Â | How long (in days) logs should be kept |
Â
The index logger link can be found in System -> Tools -> Index Management
Backend
AdminHtml - Index invalidation log action
vendor/creativestyle/magesuite-index-invalidation-logger/Controller/Adminhtml/Log/Index.php:7
class Index extends \Magento\Backend\App\Action
{
public function execute()
{
$resultPage = $this->resultFactory->create(\Magento\Framework\Controller\ResultFactory::TYPE_PAGE);
$resultPage->getConfig()->getTitle()->set(__('Index invalidation log'));
return $resultPage;
}
}
Â
Cron - cleanup logs
vendor/creativestyle/magesuite-index-invalidation-logger/Cron/LogsCleanup.php:26
class LogsCleanup
{
public function execute()
{
if (!$this->configuration->isLoggingEnabled()) {
return;
}
$this->cleanLogs->execute($this->configuration->getLoggingRetentionPeriod());
}
}
Â
Command - cleanup logs
Is used by previous mentioned cron
vendor/creativestyle/magesuite-index-invalidation-logger/Model/Command/CleanLogs.php:17
Â
Adding $stackTraceId
to InvalidationLog
table
vendor/creativestyle/magesuite-index-invalidation-logger/Model/ResourceModel/InvalidationLog.php:28
Â
vendor/creativestyle/magesuite-index-invalidation-logger/Model/ResourceModel/InvalidationLogStacktrace.php:14
Â
Frontend
There are no frontend functionalities in the module.