Making log message priority show up in syslog

1

I'm using Red Hat 6.0 on a testing server. My code contains

syslog(pri,"(%u)%s",(unsigned int)getTid(),buf);

The log message in syslog looks like

(18597)DES=Recved confirmation of successful reception from 172.16.88.185:8889.

How can I configure syslog.conf to make log message priority show up in syslog?

Edit:
getTid is the function I used to get the thread id; buf(const char*) is a variable I used for the log message, pri is the log level I set, e.g. LOG_ERR, LOG_DEBUG, &c.

When I ask about "log message priority," I mean LOG_ERR, LOG_INFO, &c.

William

Posted 2011-10-21T18:29:43.993

Reputation: 11

Answers

0

Your syslogd or sysklogd may not be able to do this. rsyslog can do that, see http://www.rsyslog.com/

ott--

Posted 2011-10-21T18:29:43.993

Reputation: 1 911

0

I know I'm doing some gravedigging here, but for the record you can run sysklogd with -S to include a numeric facility and priority value. -SS includes the names.

miken32

Posted 2011-10-21T18:29:43.993

Reputation: 431