Move syslog utility functions into a separate file so they can be re-used.