[development] watchdog -> dblog + syslog
kb at 2bits.com
Tue Apr 10 14:51:07 UTC 2007
On 4/10/07, Dries Buytaert <dries.buytaert at gmail.com> wrote:
> 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.
To module developers:
Please be careful about being too generous with the highest severity levels,
such as Emergency, Critical, and Alert. Use sparingly and only when needed
so as not to clutter things (no one wants php undefined variable notices
sent to their pager!)
Also a new project has been created for logging and alerts. It has the
alert module, compatible with HEAD (no nightly builds, because there is
no 6 tag yet, but get it through CVS or the Browse CVS link.
This is a good demo on how to use the new hook too. The email message
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.
It would be nice to get feedback from the doc team on this too (sepeck,
laura)? See patch below.
We'll also want to provide some basic instructions on how to setup
> the syslog routing in syslog.conf.
There is a URL linked to in syslog settings to the syslog.conf man page
I expanded that a bit, and added more instructions.
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. :-)
I created a patch for that in here
Drupal development, customization and consulting.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the development