In the interest of, "If you can split up a patch, do so," this is the "introduce new status level" idea from http://drupal.org/node/77875

Dries and drumm both make good points about how dropping the logging of things like 404s, 403s, and search terms can adversely affect the site. At the same time though, there are lots of just "status" messages that an admin of a busy site does not care about and would be willing to go without if it meant a performance increase.

CommentFileSizeAuthor
#4 watchdog_status.patch27.33 KBwebchick

Comments

dries’s picture

What would be the difference between WATCHDOG_STATUS and WATCHDOG_NOTICE?

define('WATCHDOG_NOTICE', 0);
define('WATCHDOG_WARNING', 1);
define('WATCHDOG_ERROR', 2);
webchick’s picture

Dries: I guess WATCHDOG_STATUS would either be -1 (could be problematic, as this could be considered an error condition) or a 0 and then the rest moved up a number (could be problematic if we consider backwards compatibility, but we don't so I'll probably take this route).

It would be used for messages that do not require action, and are simply "hey this happened" kind of messages. For example, a 404 message means you have links pointing to something that isn't there. It requires action to fix. On the other hand, "So and so registered for an account" would be a WATCHDOG_STATUS message; it's simply informative.

webchick’s picture

Also, in glancing through, I think delete operations should retain the NOTICE flag, in case of a rogue admin or some such thing.

webchick’s picture

Status: Active » Needs review
StatusFileSize
new27.33 KB

Here's a patch. I went the re-numbering route with the statuses (statusii? ;)). Basically any of those "Some thing you just tried to do succeeded!" messages became WATCHDOG_STATUS messages.

keith.smith’s picture

Version: x.y.z » 6.x-dev
Status: Needs review » Closed (won't fix)

Preempted by new status levels introduced by 6.x watchdog/dblog changes.