cleaning up log messages so that syslog receives correct messages