开发者

How to disable noisy debug?

开发者 https://www.devze.com 2023-03-27 18:48 出处:网络
I have simple example: def __call__(self): d = client.getPage(\'www.google.com\', timeout = 1 ) d.addCallback(self.a)

I have simple example:

def __call__(self):
    d = client.getPage('www.google.com', timeout = 1 )
    d.addCallback(self.a)
    d.addCallback(sel开发者_如何学运维f.b)
    return d

How to disable "noisy" debug for Factory class, using in getPage method ?


When using getPage, the factory object is not exposed to you, so there is no simple way to disable the logging it does.

You can disable this logging for all uses of getPage by setting noisy on the factory class:

from twisted.web.client import HTTPClientFactory
HTTPClientFactory.noisy = False
0

精彩评论

暂无评论...
验证码 换一张
取 消