This patch adds a couple of checkboxes to the admin form to make the logging of the expire actions and URLs optional.

I also noticed that the hook_user implementation always logs a message saying that the user has been "deleted", but in fact it only ever runs on the "insert", "update", and "after update" operations, so I changed it to say modified instead of deleted. As an aside, is there a reason why it runs on both "update" and "after update" instead of just one of them?

Comments

davidwhthomas’s picture

Version: 6.x-1.0 » 7.x-1.x-dev
StatusFileSize
new4.31 KB

We've found the expire module is quite noisy in the drupal watchdog log, especially on larger sites with lots of pages - it quickly fills up.

The attached patch addresses the same issue as in D6, but was written for the D7 version.

It provides a checkbox admin setting, a new expire_watchdog_log wrapper function and checks if logging is enabled prior to the watchdog call.

Attached.

Cheers,

DT

derekw’s picture

Thanks for the patch. I found it also needs to update the watchdog function called at the end of expires.rules.inc from watchdog to expire_watchdog_log.

wiifm’s picture

New rolled patch attached that builds on the patch in #1.

Changes from #1:

  • Applies against the latest HEAD
  • Default for the checkbox is enabled to retain existing verbous logging for users that already have this
  • Included the two missing watchdog calls in rules.inc (hattip #2)
  • Included the one missing watchdog call in drush.inc

This is especially handy in my situation as we are altering the expire paths, and sometimes we remove all of the paths. This means in the current version of the expire module that the watchdog log is filled with this:

Node 18205 was flushed resulting in pages being expired from the cache

Which is a meaningless watchdog call as no pages were expired.

spleshka’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

This issue was solved in 7.x-2.x. But thanks for the patch anyway!

Status: Fixed » Closed (fixed)

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