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.
Comment | File | Size | Author |
---|---|---|---|
#1 | watchdog_emergency.patch | 6.77 KB | mr.baileys |
watchdog_emergency.patch | 7.71 KB | mr.baileys | |
Comments
Comment #1
mr.baileysAnother patch got mixed up with the previous one.
Comment #2
andypostReasonable change! Patch from #1 covers all places.
Comment #3
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #5
Gábor HojtsyThis was not documented in the update docs, added here: http://drupal.org/update/modules/6/7#watchdog_emerg