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

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.