mirror of https://github.com/scrapy/scrapy.git
removed (pretty useless) DebugMiddleware
This commit is contained in:
parent
86de5180fc
commit
96bb223c13
|
|
@ -153,20 +153,6 @@ DefaultHeadersMiddleware
|
|||
This middleware sets all default requests headers specified in the
|
||||
:setting:`DEFAULT_REQUEST_HEADERS` setting.
|
||||
|
||||
DebugMiddleware
|
||||
---------------
|
||||
|
||||
.. module:: scrapy.contrib.downloadermiddleware.debug
|
||||
:synopsis: Downloader middlewares for debugging
|
||||
|
||||
.. class:: DebugMiddleware
|
||||
|
||||
This is a convenient middleware to inspect what's passing through the
|
||||
downloader middleware. It logs all requests and responses catched by the
|
||||
middleware component methods. This middleware does not use any settings and
|
||||
does not come enabled by default. Instead, it's meant to be inserted at the
|
||||
point of the middleware that you want to inspect.
|
||||
|
||||
HttpAuthMiddleware
|
||||
------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
from scrapy import log
|
||||
from scrapy.core.exceptions import NotConfigured
|
||||
|
||||
class DebugMiddleware(object):
|
||||
|
||||
def process_request(self, request, spider):
|
||||
log.msg("process_request %r" % request, domain=spider.domain_name, level=log.DEBUG)
|
||||
|
||||
def process_exception(self, request, exception, spider):
|
||||
log.msg("process_exception %s in %r" % (exception, request), domain=spider.domain_name, level=log.DEBUG)
|
||||
|
||||
def process_response(self, request, response, spider):
|
||||
log.msg("process_response %s from %r" % (response, request), domain=spider.domain_name, level=log.DEBUG)
|
||||
return response
|
||||
|
||||
# FIXME: backwards compatibility - will be removed before 0.7 release
|
||||
|
||||
import warnings
|
||||
|
||||
class CrawlDebug(object):
|
||||
|
||||
def __init__(self):
|
||||
warnings.warn("scrapy.contrib.downloadermiddleware.debug.CrawlDebug has been replaced by scrapy.contrib.downloadermiddleware.debug.DebugDownloaderMiddleware")
|
||||
DebugMiddleware.__init__(self)
|
||||
Loading…
Reference in New Issue