For some reason, the "emergency" severity constant for watchdog messages is named "WATCHDOG_EMERG". None of the other constants have an abbreviation in their name, and although not specifically mentioned in the coding standards, it looks like the generally accepted practice in core is to use full words in constant naming. The constants were added in #63881: Create a watchdog hook to enable customized logging and alerts via modules. I'm guessing the emergency one follows the naming conventions from http://be.php.net/syslog (LOG_EMERG), although if that's the case the other ones should also be abbreviated (WATCHDOG_ERR, WATCHDOG_CRIT).

Patch attached that renames WATCHDOG_EMERG to WATCHDOG_EMERGENCY to be more consistent.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mr.baileys’s picture

Title: Renamte WATCHDOG_EMERG to WATCHDOG_EMERGENCY. » Rename WATCHDOG_EMERG to WATCHDOG_EMERGENCY.
FileSize
6.77 KB

Another patch got mixed up with the previous one.

andypost’s picture

Status: Needs review » Reviewed & tested by the community

Reasonable change! Patch from #1 covers all places.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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

Gábor Hojtsy’s picture

This was not documented in the update docs, added here: http://drupal.org/update/modules/6/7#watchdog_emerg