Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to let the log only log ERROR level information #2352

Closed
shyandsy opened this issue Oct 21, 2016 · 4 comments · Fixed by #3960
Closed

how to let the log only log ERROR level information #2352

shyandsy opened this issue Oct 21, 2016 · 4 comments · Fixed by #3960
Labels

Comments

@shyandsy
Copy link

shyandsy commented Oct 21, 2016

I tried lots of way to use the ERROR level, but still all information was wrote into log file

python 3.5 + scrapy 1.2

dmoz_spider.py

configure_logging(install_root_handler=False)
logging.basicConfig(filename='log.txt', format='%(levelname)s: %(message)s', level=logging.ERROR)
settings.py

...................
LOG_LEVEL = "ERROR"
@bmetge
Copy link

bmetge commented Jan 19, 2017

Same here, any news on this ?

@Jack-Kingdom
Copy link

me too

@redapple
Copy link
Contributor

@Jack-Kingdom , @bmetge , @shyandsy ,
I think configure_logging(install_root_handler=False) is what is messing with the configuration.
In #2149 (comment) I removed that line from the docs example, and I was able to have ERROR level with a standalone script using CrawlerRunner.

@thernstig
Copy link
Contributor

thernstig commented Mar 10, 2018

@shyandsy please see my answer in #2149. I believe this issue can be closed as a clone of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants