mirror of
https://github.com/scrapy/scrapy.git
synced 2025-02-24 10:03:55 +00:00
Logging the cache directory at HttpCacheMiddleware instantiation #2604
This commit is contained in:
parent
7b49b9c0f5
commit
97d84d920b
@ -1,3 +1,5 @@
|
||||
import logging
|
||||
|
||||
from email.utils import formatdate
|
||||
from twisted.internet import defer
|
||||
from twisted.internet.error import TimeoutError, DNSLookupError, \
|
||||
@ -9,6 +11,9 @@ from scrapy.exceptions import NotConfigured, IgnoreRequest
|
||||
from scrapy.utils.misc import load_object
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class HttpCacheMiddleware(object):
|
||||
|
||||
DOWNLOAD_EXCEPTIONS = (defer.TimeoutError, TimeoutError, DNSLookupError,
|
||||
@ -24,6 +29,8 @@ class HttpCacheMiddleware(object):
|
||||
self.ignore_missing = settings.getbool('HTTPCACHE_IGNORE_MISSING')
|
||||
self.stats = stats
|
||||
|
||||
logger.debug("Using cache directory %(cachedir)s" % {'cachedir': self.storage.cachedir})
|
||||
|
||||
@classmethod
|
||||
def from_crawler(cls, crawler):
|
||||
o = cls(crawler.settings, crawler.stats)
|
||||
|
Loading…
x
Reference in New Issue
Block a user