Problem/Motivation

Every time a purge is successful, either purgeKey() or purgeAll(), a new info log message stating it is added to the database.

While in development or QA, that is useful for us to make sure it is working. Once in production, the number of log entries are expected to grow exponentially, flooding the logs and most likely causing the watchdog tables to consume a lot of database storage.

Proposed resolution

Given the debugging aspect of the messages, a checkbox should be added to the modules configuration page where this logging functionality can be optionally enabled.

Logging the critical should remain mandatory, as it's an indicator whether fastly can be reached or not.

User interface changes

A new checkbox got added to Purge options fieldset in the configuration page.

API changes

N/A

Data model changes

A new configurtipon variable purge_logging was added to the schema.

Release notes snippet

Logging messages for successful Purges are now disabled by default. It should be manually enabled in the module's configuration page when nedded.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

swentel created an issue. See original summary.

dscl’s picture

Title: Add a setting to disable logging » Add a setting to enable Purge success logging
Priority: Normal » Major
Issue summary: View changes
Status: Active » Needs review
FileSize
4.09 KB

I agree with this. The logging messages have become an annoying issue once we moved this to production.
In my understanding, that messages are more like a debug thing than an information we need to have in the logs every time, so I'm pushing a patch where this messages are made optional and a configuration setting is added.

Considering it creates problems for sites that use the module on production, I'm marking it as Major.

I've updated the description accordingly.

xSDx’s picture

Think we should move this under purge options since this is option for purge. Example: $form['purge']['purge_options']['purge_logging']

xSDx’s picture

Status: Needs review » Needs work
xSDx’s picture

xSDx’s picture

Status: Needs work » Needs review
vvuksan-fastly’s picture

Status: Needs review » Fixed

Commited to master.

vvuksan-fastly’s picture

Status: Fixed » Closed (fixed)