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.
Comment | File | Size | Author |
---|---|---|---|
#2 | add-purge-logging-switch-2891113-2-D8.patch | 4.09 KB | dscl |
Comments
Comment #2
dscl CreditAttribution: dscl at DevBrains, Digital Garden commentedI 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.
Comment #3
xSDx CreditAttribution: xSDx at Websolutions Agency commentedThink we should move this under purge options since this is option for purge. Example:
$form['purge']['purge_options']['purge_logging']
Comment #4
xSDx CreditAttribution: xSDx at Websolutions Agency commentedComment #5
xSDx CreditAttribution: xSDx at Websolutions Agency commentedhttps://github.com/vvuksan/fastly-drupal/pull/27
Comment #6
xSDx CreditAttribution: xSDx at Websolutions Agency commentedComment #7
vvuksan-fastly CreditAttribution: vvuksan-fastly commentedCommited to master.
Comment #8
vvuksan-fastly CreditAttribution: vvuksan-fastly commented