A 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:
- Making Drupal more suitable for the enterprise, since it could be integrated better into their monitoring and network management infrastructure.
- Allows site admins to be notified of important events. This applies equally to large and small sites.
- Helps scalability by not logging to the database, thus relieving the load.
- Conforms to RFC 3164 for severity levels.
- Allows integration with many more delivery channels such as SMS, Instant Messaging, ...etc.
Here are some resources for further reading.
- Blog post with early version of proposal and screen shots: Drupal 6: proposal for a watchdog hook for logging and alerts.
- Drupal.org issue: Create a watchdog to enable customized logging and alerts via modules.
- Documentation on converting your modules from 5.x to 6.x, describing the new hook_watchdog, what it does, as well as examples for usage.
- The new hook_watchdog at api.drupal.org.
- Dries commit #63601.
- Drupal contributed project: Logging and alerts.
- Drupal groups: Funding of backport of watchdog external logging for Drupal 5.