foreach (module_implements('watchdog', TRUE) as $module) {
    module_invoke($module, 'watchdog', $log_message);
  }

The TRUE parameter to module_implements() makes it return the modules ordered by name. This applies to both Drupal 7 and Drupal 6.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcingy’s picture

Status: Active » Needs review

Patch to invoke watchdog by weight rather by name. Other than in help system which makes sense this is an exception.

marcingy’s picture

FileSize
598 bytes

Missing patch

Dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

andypost’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Needs review
FileSize
647 bytes

Same for D6

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Looks fine

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

This was committed in [63881] where I found no mention of thought given into the specifics of why would this be ordered by name and not weight. Also I do not expect existing modules to be dependent on the by name ordering as by weight is the norm. So committed.

Status: Fixed » Closed (fixed)

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