Scrapy, a fast high-level web crawling & scraping framework for Python.
Add flush() method to StreamLogger
Paul Tremberth498a3725d18c
diff --git a/scrapy/utils/log.py b/scrapy/utils/log.pyindex cc2f0b164..a28002c08 100644--- a/scrapy/utils/log.py+++ b/scrapy/utils/log.py@@ -145,6 +145,9 @@ class StreamLogger(object):for line in buf.rstrip().splitlines():self.logger.log(self.log_level, line.rstrip())+ def flush(self):+ pass+class LogCounterHandler(logging.Handler):"""Record log levels count into a crawler stats"""