Skip to content

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

Closed
@shyandsy

Description

@shyandsy

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions