The following code send a message to the file /var/log/syslog. I have a remote server which is listening in port 514(rsyslog). Is there any way to change this code so it will send a message to the remote server?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
int main(int argc, char *argv[])
{
openlog ("Engine", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_LOCAL1);
syslog(LOG_NOTICE,"***Example***");
}