move all syslog code here