#2008832 Allow to optionally turn of "successful" actions in watchdog provides a setting to reduce the number of watchdog messages that the module logs.

The setting is not applied to watchdog messages from apache solr delete queries in apachesolr.index.inc.

e.g.

  // Log the query used for deletion.
  watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);

should be, following the example

  // Log the query used for deletion.
  $log_success = variable_get('apachesolr_watchdog_successes', TRUE);
  if ($log_success) {  
    watchdog('Apache Solr', 'Deleted documents from index with query @query', array('@query' => $query), WATCHDOG_INFO);
  }

Besides three instances in apachesolr.index.inc, I don't see any other watchdog messages for successful queries that don't check the setting.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

calebtr’s picture

Status: Active » Needs review
FileSize
2.06 KB

Here is a patch. This reduces log bloat when deleting content is a regular activity or done in batches.

rv0’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, works like a charm and patch is clean.

SylvainM’s picture

Patch works good for me too (tested with migrate imports and rollbacks).
I'd be glad to see this patch applied :-)

jgrubb’s picture

Status: Reviewed & tested by the community » Fixed

  • calebtr authored db04757 on 7.x-1.x
    Issue #2232723 by calebtr: watchdog messages for solr delete queries...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

joseph.olstad’s picture

see related issue....