Fix logging when no rsyslog host is configured

The call to `inet:getaddr/2` will return a valid IP on `*.cloudant.com`
hosts due to our DNS configuration. This avoids the entire call when we
have not configured a syslog host.

This change was motivated by Jenkins which wasn't logging during `make
check` runs.

BugzId: 26411