Add support for syslog logging. Remove some dead code.