Problem/Motivation

On sites with active content migrations or frequent cron-based content updates, Silktide will produce a log entry for each content update or creation. This produces large amounts of log messages with very little added value. Depending on the site's logging configuration, a migration could cause Silktide to fill up the watchdog log up to the configured limit, after which the cron maintenance task will clean everything up — including potentially useful log messages from other modules.

Steps to reproduce

  1. Enable the Silktide module on a Drupal site.
  2. Run a content migration or trigger a bulk content update (e.g., via Drush or a migration plugin) that creates or updates a large number of nodes.
  3. Check the watchdog log (Reports > Recent log messages).
  4. Observe that Silktide has produced one info-level log entry per notified URL, flooding the log table.

Proposed resolution

Add a Verbose logging checkbox to the Silktide settings form that gates the log entry for successful Silktide notifications. When the option is disabled (the new default), only failures are logged. When enabled, successful notifications are logged as before.

The change is implemented across four files:

  • config/schema/silktide.schema.yml — adds the verbose_logging boolean key to the silktide.settings config schema.
  • silktide.install — adds update hook silktide_update_11201() that sets verbose_logging to FALSE for existing installations if the key is not yet present.
  • src/Form/SilktideForm.php — adds the Verbose logging checkbox to the admin settings form with the description: "When enabled, successful Silktide notifications are also logged. By default only failures are logged."
  • src/SilktideService.php — wraps the existing info-level log call in a verbose_logging guard so it is only executed when the option is turned on.

Remaining tasks

  • Review and merge.

User interface changes

A new Verbose logging checkbox is added to the Silktide administration settings form (Administration > Configuration > Web services > Silktide). It is unchecked by default.

API changes

A new boolean configuration key verbose_logging is added to the silktide.settings configuration object. It defaults to FALSE. No existing public APIs are changed.

Data model changes

No database schema changes. The new verbose_logging value is stored in Drupal's standard configuration system. Existing sites receive the new key with a value of FALSE via the silktide_update_11201() update hook.

Issue fork silktide-3578476

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arturs.v created an issue. See original summary.

arturs.v’s picture

Status: Active » Needs review