I need the syslog for logging messages to UNIX.
I tried it as follow which was mentioned before but it didn't work.
"
Open a UDP socket (port 514) to the syslogd running on your unix host
and pass the socket's file
descriptor to logInit() - no need to 'modify' logLib.
"
"
/* revised code */
if((sFd = socket(AF_INET, SOCK_DGRAM, 0)) == ERROR)
{
printf("socket\n");
}
sockAddrSize = sizeof(struct sockaddr_in);
bzero((char*) &serverAddr, sockAddrSize);
serverAddr.sin_len = (u_char)sockAddrSize;
serverAddr.sin_port = htons(514);
serverAddr.sin_addr.s_addr = inet_addr("200.100.12.244");
if (connect(sFd, &serverAddr, sockAddrSize) < 0)
{
printf("error connect syslog socket\n");
}
logInit (sFd, MAX_LOG_MSGS); /* initialize logging */
"
If you know how to solve this or have the source code about syslog client,
please send me a message. thanks
If you insist on itegrating your syslog client with logLib, you need to pass
logTask a file descriptor of a PIPE, and have your own task read the messaes
from the pipe, add headers etc., and send it over to the syslog server.
"changwoo" <cw...@korealink.ne.kr> wrote in message
news:3d64ee1a.02082...@posting.google.com...