Configure a Syslog-based Error Log Publisher using the dsconfig tool. You should use syslog locally on localhost and use syslog-ng to send the data packets over the UDP protocol.
Because syslog implementations differ by vendor, review your particular vendor’s syslog configuration.