diff --git a/scrapy/logformatter.py b/scrapy/logformatter.py index 2a89c00c5..075a6d862 100644 --- a/scrapy/logformatter.py +++ b/scrapy/logformatter.py @@ -43,6 +43,7 @@ class LogFormatter(object): 'request_flags' : request_flags, 'referer': referer_str(request), 'response_flags': response_flags, + # backward compatibility with Scrapy logformatter below 1.4 version 'flags': response_flags } } diff --git a/tests/test_logformatter.py b/tests/test_logformatter.py index 52646ec1b..94e6c9fde 100644 --- a/tests/test_logformatter.py +++ b/tests/test_logformatter.py @@ -66,7 +66,6 @@ class LoggingContribTest(unittest.TestCase): class LogFormatterSubclass(LogFormatter): - # Formatter with format spec that is same as in Scrapy before 1.3 version. def crawled(self, request, response, spider): kwargs = super(LogFormatterSubclass, self).crawled( request, response, spider) @@ -82,7 +81,6 @@ class LogFormatterSubclass(LogFormatter): class LogformatterSubclassTest(LoggingContribTest): - # Test if old crawledmsg format string still works fine def setUp(self): self.formatter = LogFormatterSubclass() self.spider = Spider('default')