Scrapy - logging to file and stdout simultaneously, with spider names

后端 未结 7 1841
悲&欢浪女
悲&欢浪女 2021-01-30 18:28

I\'ve decided to use the Python logging module because the messages generated by Twisted on std error is too long, and I want to INFO level meaningful messages such

7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-30 18:56

    It is very easy to redirect output using: scrapy some-scrapy's-args 2>&1 | tee -a logname

    This way, all what scrapy ouputs into stdout and stderr, will be redirected to a logname file and also, prited to the screen.

提交回复
热议问题