set syslog levels properly, close syslog at exit