![]() |
Services | Software | Partners | Articles | Contact |
Drupal 6: new hook_watchdog for logging and alertsA week ago, I proposed a new hook_watchdog, so modules can decide where to send Drupal events, and not be limited to the watchdog table. As of today, this patch is in core, and there is already two modules that use it, syslog, which is in core, and emaillog, which is part of the logging and alerts project. This patch opens the door to many neat things, such as:
Here are some resources for further reading. Resources
|


Now available for Drupal 5.1
A backport of this patch is now available for Drupal 5.1.
-- 2bits -- Drupal consulting
one more change for watchdog
Unfortunately one more change is required for watchdog() calls. Now all calls have t() evaluated runtime, which results in a "nice" mix of languages used to log your messages regardless of where are those logged, if you have multiple languages supported on the site.
To fix this, watchdog() calls should have t() calls removed, and the messages should only get translated when displayed (in Drupal), and probably never if you collect them in some external application.
Relevant issue: http://drupal.org/node/76588