开发者

How to disable noisy debug?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜