Currently, the dblog module does not have the bootstrap flag set to 1 so it is not included in the module_list that get returned when you call watchdog during boot.

Example: I have have a module that implements hook_boot() to do some stuff. During that time I want to call the watchdog() function which is contained in the bootstrap.inc. The watchdog function formats the log message and then calls module_implements('watchdog') to supply a foreach loop. The module_implements() function then calls module_list(FALSE, TRUE, $sort) which will only return modules that have the bootstrap flag set to 1. The dblog module does not have this flag set. So during bootstrapping, there is no way to create any watchdog entries with dblog. I manually set the bootstrap flag to 1 for dblog and everything worked like I expected.

Is there a reason why dblog is installed without the bootstrap flag set?

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.