[development] RE : Disable watchdog globally
Peter Droogmans
Peter at attiks.com
Sat Feb 19 20:17:41 UTC 2011
Isn't it safer to just provide another backend logging module, that does nothing
Best regards,
Peter Droogmans
Attiks
Ketsstraat 94
2140 Borgerhout
Belgium
32 3 288 61 17
32 497 44 44 77
-----Original Message-----
From: development-bounces at drupal.org [mailto:development-bounces at drupal.org] On Behalf Of FGM
Sent: zaterdag 19 februari 2011 6:33 PM
To: development at drupal.org
Subject: Re: [development] RE : Disable watchdog globally
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