I am using syslog()
function for logging information in one of my application.
I am using c code to call syslog()
function in Fedora 14 Linux.
Currently when i call syslog function something like this:
syslog(LOG_INFO,"MYLOG");
I am getting logged msg in /var/log/messages
file as follows
Oct 7 04:32:53 syslogname MYLOG
Now i want to have custom Priority value (say 137) logged in the beginning of the syslog()
message. for eg: log should look some thing like this.
PRI Oct 7 04:32:53 syslogname MYLOG
I want PRI
number to appear in the beginning of the logged message. I did Google search but didn't get proper answer. Request you to kindly suggest as to how to do this using syslog()
function?