biglocalnews / court-scraper

Scrapers for U.S. county court sites.
ISC License
57 stars 18 forks source link

Refactor cli logging #100

Open zstumgoren opened 3 years ago

zstumgoren commented 3 years ago

Refactor cli to set logfile and log level configuration via CLI options, similar to WARN project.

Background

For time being, moved cli.py logging setup inside the search command to simplify testing as part of #97.

Previously we were configuring logging in global namespace and creating a log file in the user's default court scraper directory. That strategy causes headaches for testing (mocks/patching are a nightmare in this scenario).