Bdfy
Bdfy

Reputation: 24621

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(self.b)
    return d

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

Upvotes: 1

Views: 363

Answers (1)

Jean-Paul Calderone
Jean-Paul Calderone

Reputation: 48325

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

Upvotes: 3

Related Questions