I have a social site which is picking up in traffic. I have my watchdog set to 10,000 entries. This is filling up in a single day. That means I'm doing 10,000 database inserts and important failed messages could be lost in a bunch of cruft.

I'm going through contrib and patching the worst offenders of which apachesolr is one. Perhaps this is because I run apachesolr index in cron every two minutes, but there are two useless "you have succeeded" messages which fill up my watchdog (including the apache solr watchdog messages) and could potentially make me miss out on errors, which is what I really care about when browsing through watchdog.

Here's a patch which makes these messages optional. Additionally the admin interface has been make in the setting tabs of apachesolr.

Comments

nick_vh’s picture

@@ -511,6 +511,14 @@ function apachesolr_settings(array $form, array &$form_state) {
+    '#title' => t('Would you like successful solr actions to be logged'),
+    '#description' => t('Watchdog logs successful adds and indexes which happen with apache solr.'),

this should just be : "Log successful solr actions"

I'll rework it but I like the idea! And yes, I agree it should be enabled by default.

@@ -348,15 +348,19 @@ function apachesolr_index_send_to_solr($env_id, array $documents) {
+  if(variable_get('apachesolr_watchdog_successes', TRUE)) {

code standards require a space

@@ -348,15 +348,19 @@ function apachesolr_index_send_to_solr($env_id, array $documents) {
+    if(variable_get('apachesolr_watchdog_successes', TRUE)) {

code standards require a space between the verb and the opening (

nick_vh’s picture

Status: Needs review » Needs work

The last submitted patch, apachesolr-optional-success-watchdog-2.patch, failed testing.

nick_vh’s picture

Status: Needs work » Needs review
StatusFileSize
new10.28 KB

Added some hotfixes to this patch from the UI change. Sorry to mix and mingle :-)

Status: Needs review » Needs work

The last submitted patch, apachesolr-optional-success-watchdog-3.patch, failed testing.

nick_vh’s picture

Status: Needs work » Needs review
StatusFileSize
new10.5 KB
nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Needs review » Patch (to be ported)

Committed, needs backport

Chris Charlton’s picture

Issue summary: View changes

I assume a 6.x backport isn't happening anymore. Should we close this?