Hello world, 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 and Jake! Let's try to get more logging improvements into Drupal 6. Anyone wants to improve the dblog module to work like this: http:// www.flickr.com/photos/dries/234754367/ ? -- Dries Buytaert :: http://www.buytaert.net/
Dries Buytaert wrote:
Let's try to get more logging improvements into Drupal 6. Anyone wants to improve the dblog module to work like this: http://www.flickr.com/photos/dries/234754367/ ?
I had opened a similar issue[1] without AJAX. I can improve it if I can have enough time. [1] Select multiple message type to list in watchdog_overview http://drupal.org/node/79444 Erdem Kose
On 10 Apr 2007, at 14:27, Erdem Köse wrote:
Dries Buytaert wrote:
Let's try to get more logging improvements into Drupal 6. Anyone wants to improve the dblog module to work like this: http:// www.flickr.com/photos/dries/234754367/ ?
I had opened a similar issue[1] without AJAX. I can improve it if I can have enough time.
[1] Select multiple message type to list in watchdog_overview http://drupal.org/node/79444
The AJAX is not a must. Does your patch still apply? If not, it would be great if you could update it against CVS HEAD. I'd love to give it a try. :) -- Dries Buytaert :: http://www.buytaert.net/
On 10 Apr 2007, at 14:27, Erdem Köse wrote:
Let's try to get more logging improvements into Drupal 6. Anyone wants to improve the dblog module to work like this: http:// www.flickr.com/photos/dries/234754367/ ?
I had opened a similar issue[1] without AJAX. I can improve it if I can have enough time.
[1] Select multiple message type to list in watchdog_overview http://drupal.org/node/79444
There are actually 2 axis along which we can filter: 1. the message's type ('page not found', 'access denied', 'php message', 'user message', 'content message'). 2. the message's severity ('critical', 'error', 'warning', 'notice', 'debug'). Both (1) and (2) are parameters of the watchdog() function. It might be a good idea to provide two filter blocks, one for type and one for severity. Then I can do queries like: "show all user messages that are critical". -- Dries Buytaert :: http://www.buytaert.net/
On Apr 10, 2007, at 7:06 AM, Dries Buytaert wrote:
2. the message's severity ('critical', 'error', 'warning', 'notice', 'debug').
On 4/10/07, Dries Buytaert <dries.buytaert@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 emaillog 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. http://drupal.org/project/logging_alerts This is a good demo on how to use the new hook too. The email message is themable. 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 http://drupal.org/node/63881#comment-226747 Please review. -- 2bits.com http://2bits.com Drupal development, customization and consulting.
On Apr 10, 2007, at 7:51 AM, Khalid Baheyeldin wrote:
Also a new project has been created for logging and alerts. It has the emaillog alert module,
cool, thanks.
compatible with HEAD (no nightly builds, because there is no 6 tag yet, but get it through CVS or the Browse CVS link.
FYI: you don't need a DRUPAL-6 branch to make a development snapshot release that's compatible with 6.x core. just make a release node and use "HEAD" as the CVS branch, set it to "6.x" core compatibility, and give it a major number of "1", a patch level of "x", and an extra identifier as "dev". viola, a 6.x-1.x-dev development snapshot from HEAD. then, whenever you make the DRUPAL-6 branch, you can just edit this release node and you'll now have the option to move the CVS branch from HEAD to DRUPAL-6. no, you don't need any special permissions on d.o for this -- anyone who can edit the release node can move it from HEAD if there's now a CVS branch that doesn't have a release node but that specifies the same version information. after that "HEAD" will again be an available choice when creating new release nodes, e.g. for the initial 7.x port, or as a 6.x-2.* new feature series. so long as you give the HEAD release node a version number that *could* someday be its own branch (i.e. major number >= 1), you can always move a HEAD release node to the appropriate branch once that exists. see http://drupal.org/node/89699 for more. someone should really update http://drupal.org/node/17570#HEAD with this wisdom. any volunteers? ;) cheers, -derek
Dries Buytaert wrote:
Let's try to get more logging improvements into Drupal 6. Anyone wants to improve the dblog module to work like this: http://www.flickr.com/photos/dries/234754367/ ?
Indeed! Let's try to get more logging improvements, like actually logging messages in a single language, not in the current language used to display a page, which results in log messages mixed in all kinds of languages. People, please comment on my implementation details here or provide a better alternative :) http://drupal.org/node/76588 Gabor
participants (5)
-
Derek Wright -
Dries Buytaert -
Erdem Köse -
Gabor Hojtsy -
Khalid Baheyeldin