Log to dynamic stderr
Set log formatter
Replace all remaining "print"s by logging.