class MySpider(BaseSpider):
    name = 'myspider'

def __init__(self, name=None, **kwargs):
    ScrapyFileLogObserver(open('spider.log', 'w'), level=logging.INFO).start()
ScrapyFileLogObserver(open('spider_error.log', 'w'), level=logging.ERROR
    ).start()
super(MySpider, self).__init__(name, **kwargs)
Logging to specific error log file in scrapy