Logging in Scrapy

后端 未结 3 1107
半阙折子戏
半阙折子戏 2021-01-02 07:53

I am having trouble with logging in scrapy, and most of what I can find is out of date.

I have set LOG_FILE=\"log.txt\" in the settings.py

3条回答
  •  执笔经年
    2021-01-02 08:00

    I was unable to make @Rafael Almeda's solution work until I added the following to the import section of my spider.py code:

    from scrapy.utils.log import configure_logging 
    

提交回复
热议问题