Improves exception logging by using the exception itself when printing.
Tries again once when it fails to resolve the host.