Overhaul logging in programs
Consolidate logging to be initialized in programs, so that only one logger is instantiated throughout. This allows a simplication of code inside the main tasks, and makes the separation cleaner between the CLI and the API.
Controlling the log level is removed in the configuration entirely, and instead two toggles in the CLI are exposed (default prints INFO):
-
-q/--quiet
: reduce logging level to WARNING -
-v/--verbose
: increase logging level to DEBUG
These get propagated to stream or batch jobs correspondingly.
This also stops writing logs to specified log files, in favor of writing everything to stderr. These logs can be managed better by external tools, e.g. condor, systemd, logrotate.
As part of this effort, I've switched to argparse to make this a lot easier, and was long overdue. This adds a new cli
module that houses a lot of the tooling to make each program much simpler than before. It'd be nice to remove these programs entirely in favor of entry points, but that will take more effort to achieve.
Closes #43 (closed).