DisableLog

DisableLog

  • Increased loading times
  • Stop clogging your database
  • Install and you're done

Magento, by default, logs a lot of things. This fills up the database slowly and also gives a slightly lower pageload. And if you're using external site-statistics-tools like GoogleAnalytics and Piwik anyway, this logging is pointless. Disable it using our extension.

Cost Free
Current version 0.0.14 (Stable)
Requirements Magento CE 1.7 - 1.9
Magento EE 1.10 - 1.14
PHP 5.5.0 or higher (5.5, 5.6, 7.0, 7.1)
Download Download
Support Support Forum
License GNU/GPL (General Public License)

Backgrounds

The Magento core has an excellent logging system: Every time that a request hits the Magento application, its details are logged. This might lead to a huge database-size over time. Not everybody wants this: There are numerous threads discussing the periodic cleaning of those tables using the SQL-statement TRUNCATE. But this is only part of the problem.

Besides filling up the database, this logging also causes various extra SQL INSERT statements to be made for every pageload. If you have a busy site, this certainly has an impact on database-performance.

Now, if you're relying on those Magento log-statistics, you'll just have to accept this as a fact. But if you're using other external services like Piwik or GoogleAnalytics, this Magento logging is actually an unwanted feature.

Our extension

Our extension gives you the power to disable all this Magento logging: Either for all requests being made, or only for search-robots. It disables logging, but also disables the autoincrement flag for certain search patterns: The latter is interesting if you are interested in what your real-life customers are actually searching for, while by default search engines mess up these statistics.

Technical specifications

This extension makes overrides of two Magento core-models:

  • Mage_Log_Model_Visitor
  • Mage_CatalogSearch_Model_Query

To determine which useragent is a robot, an XML-based list in the extensions config.xml is used. The XML-path to this list is config/global/skip_user_agents - using this path you could extend the list using your own app/etc/local.xml file. If you have additions to the list, you could also just mail them to us, so we'll include it with the next release.

Usage

To use this extension, download the package and install the files in your Magento application. Next, navigate to the Magento System Configuration and locate the DisableLog section in the bottom. The extension has the following options:

  • Enabled - Global flag to disable this extension temporarily
  • Disable All Logs - If set to Yes, logging will be disabled not only for search engines but every user agent. This will also disable the Magento statistics of Online Customers.

Frequently Asked Questions

FAQ: Isn't disabling Mage_Log under "Disable Modules Output" sufficient?

Within the Magento backend, you can disable the output of various Magento modules through System > Configuration > Advanced > Disable Modules Output. Within that page, you can also disable the module Mage_Log. But this does not disable logging. It disables the modules output, as in the theming output. The Mage_Log module has no output, it only has functionality of logging.

You can test this for yourself. Take a Magento application, which has this DisableLog extension not installed yet. Next, disable the Mage_Log module within the Disable Modules Output page. Next, go to the database table log_url and you will see that new entries are still created when you visit pages in the frontend. Hence, that setting does not disable logging, and our extension DisableLog is still needed.

FAQ: Isn't disabling logs under the Developer settings the same?

Within the Magento backend, you can disable logging through the setting System > Configuration > Developer > Log Settings > Enabled. But that setting only disables logging for developers to the logs in the folder var/log. It does not disable the logging of statistical data of the Mage_Log module. Hence, our extension DisableLog is still needed.

FAQ: Which tables are kept clean?

Only the tables starting with log_ are kept clean by this extension.

More extensions

WebP for Magento

WebP for Magento

Implement WebP into Magento Serve smaller images
New Relic

New Relic

Collect more Magento data within your New Relic dashboard
DisableLog

DisableLog

Save needless delays by skipping Magento 1 logging