DDF-880 Review/refactor all error logging.

Probably the main thing to watch out for here is any inadvertent double-logging. There shouldn't be any functional issues.