Fix syslog handler in domain mode

Supercedes #5654