[development] RE : Disable watchdog globally

FGM fgm at osinet.fr
Sat Feb 19 17:32:49 UTC 2011

Hmmm, Randy, I'm afraid no one asked how to remove the watchdog function, 
which would cause the problems you describe, but how to disable it, meaning 
(AIUI) how to cause it to have no effect, for which one really needs to 
disable every module implementing its hook_watchdog(), not just 
dblog.module. As you very well know, there are several alternative modules 
implementing it, including syslog.

This being said, having drush implement it on behalf of system.module does 
not look (to me) like a safe practice, as can be seen from the sample 
consequence mentioned by sivaji.

This being said, a hackish/interesting alternative would be to use 
runkit_function_redefine() to change the normal implementation, but that's 
definitely not good practice.

----- Original Message ----- 
From: "Randy Fay" <randy at randyfay.com>
To: <development at drupal.org>
Sent: Saturday, February 19, 2011 5:49 PM
Subject: Re: [development] RE : Disable watchdog globally

> None of this is ok, as the function watchdog() is used everywhere, and it 
> would then be an undefined function. It just doesn't make any sense from 
> the beginning.
> If you don't want the database logging, you can disable the dblog module 
> and enable syslog instead, or use another backend logging module.
> -Randy
> On Sat, Feb 19, 2011 at 9:24 AM, Ryan Chan 
> <ryanchan404 at gmail.com<mailto:ryanchan404 at gmail.com>> wrote:
> On Sun, Feb 20, 2011 at 12:08 AM, sivaji j.g 
> <sivaji2009 at gmail.com<mailto:sivaji2009 at gmail.com>> wrote:
>> On Sat, Feb 19, 2011 at 7:24 PM, fgm 
>> <fgm at osinet.fr<mailto:fgm at osinet.fr>> wrote:
>>>  module_disable(module_implements('watchdog'));
>> Don't try this. It attempts to disable "system" the core required module 
>> in
>> D6.
> I am using D7, so assume it is ok?
> Thanks.
> --
> Randy Fay
> Drupal Module and Site Development
> randy at randyfay.com<mailto:randy at randyfay.com>
> +1  970.462.7450

More information about the development mailing list