Log messages


I am using QNX 4.25, Watcom 10.6 compiler.

In many programs I am writing messages to the log by using vsyslog. I’m not directly using vsyslog but using a wrapper function which is as follows:
void log_write(int severity, int syserr, const char *format, …)
va_list ap;

va_start(ap, format);

if (severity <= l_debug) {
if (!daemonize) {
vfprintf(stderr, format, ap);
if (syserr != 0)
fprintf(stderr, “: %s”, strerror(syserr));
fprintf(stderr, “\n”);
} else {
if (syserr == 0)
vsyslog(severity, format, ap);
else {
char buf[512];

strlcpy(buf, format, sizeof(buf));
strlcat(buf, ": %m", sizeof(buf));
vsyslog(severity, buf, ap);




I have checked in /etc/syslog.conf for the name of the file(/tmp/syslog) to which log messages are written. But I;'m not able to see them in that file.

Is there anything that I am doing wrong or do I need to enable for looking the log messages.

Thanks in advance.

I am assuming you have called openlog() or whatever the function is called that you need to use to open your connection to the syslog server? I am not on/in QNX4 right now, so I can’t look up the exact call.