Improve logging configuration
There is a TODO note here about improving logging configuration. Currently there is some repetitive code in most of the commands for configuring logging, which should be centralized.
There should also be more options for logging; at the very least to specify a path to a logfile to write to.
Additionally, for some commands (especially training) there should probably be a default log file; e.g. so that the log for a training run is written to that run's directory.