Rather than going through all of these hoops to stop SSL setup and daemonization, would it be better to extract out the logging setup code and test it in isolation?