[development] watchdog -> dblog + syslog
dries.buytaert at gmail.com
Tue Apr 10 10:56:17 UTC 2007
I've just committed a patch (http://drupal.org/node/63881) that adds
a tiny syslog module to Drupal core. In addition, the watchdog
module has been renamed to dblog (database logging).
Last but not least, there is now a _watchdog() hook that modules can
tap into. In other words, it's now possible to integrate with
existing logging applications or to write custom logging handlers
(i.e. to send you an SMS message when something goes wrong, or to
send you a Jabber notification when someone posts a new comment on
your Drupal blog).
If you're a developer, you'll notice that we now have additional
"watchdog levels" like WATCHDOG_CRITICAL and WATCHDOG_DEBUG. These
are conform RFC 3164 and are defined as constants in bootstrap.inc.
Check 'em out.
The patch is a little rough around the edges -- most notably on the
documentation side (help texts, form descriptions, terminology) ...
We'll want to work on that, and I expect to see a number of small
follow-up patches to polish some of this.
We'll also want to provide some basic instructions on how to setup
the syslog routing in syslog.conf. We'll want to formulate practical
advice as when to use dblog and when to use syslog. Feel free to
help with that, as you explore the new functionality. It can be done
in multiple small steps. :-)
Most of the work has been done by Khalid and jakeg, so thanks Khalid
Let's try to get more logging improvements into Drupal 6. Anyone
wants to improve the dblog module to work like this: http://
Dries Buytaert :: http://www.buytaert.net/
More information about the development