Don't log err.stack if we don't have a logger available.