Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
#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.
Comment | File | Size | Author |
---|---|---|---|
#1 | apachesolr-watchdog-delete-messages-honor-setting-2232723-1.patch | 2.06 KB | calebtr |
Comments
Comment #1
calebtr CreditAttribution: calebtr commentedHere is a patch. This reduces log bloat when deleting content is a regular activity or done in batches.
Comment #2
rv0 CreditAttribution: rv0 commentedThanks, works like a charm and patch is clean.
Comment #3
SylvainM CreditAttribution: SylvainM at Axess Open Web Services commentedPatch works good for me too (tested with migrate imports and rollbacks).
I'd be glad to see this patch applied :-)
Comment #4
jgrubb CreditAttribution: jgrubb commentedComment #7
joseph.olstadsee related issue....