make syslog thread-safe