Thank You David :)<br><br><div><span class="gmail_quote">On 11/13/05, <b class="gmail_sendername">David Tonhofer, m-plify S.A.</b> <<a href="mailto:d.tonhofer@m-plify.com">d.tonhofer@m-plify.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
--On Sunday, November 13, 2005 4:59 PM +0530 Nikhil <<a href="mailto:mnikhil.juno@gmail.com">mnikhil.juno@gmail.com</a>> wrote:<br><br>>
But this is not the same on Solaris, as I do get them on a Solaris '
syslog . Why this should not be the case with Linux as well ?<br>><br>><br>> On 11/12/05, David Tonhofer, m-plify S.A. <<a href="mailto:d.tonhofer@m-plify.com">d.tonhofer@m-plify.com</a> > wrote:<br>><br>
> I'm pretty sure that there is no way to set up the format without changing syslogd's<br>> code (which is probably not hard to do, BTW).<br>><br><br>Because Solaris != Linux ?<br><br>Seriously though, Solaris seems to have more feature-full logging facilities.
<br>Which is nice. In particular:<br><br>man log (7D):        <a href="http://docs.sun.com/app/docs/doc/816-5177/6mbbc4g7k?a=view">http://docs.sun.com/app/docs/doc/816-5177/6mbbc4g7k?a=view</a><br>man syslogd (1M):    <a href="http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqig?a=view">
http://docs.sun.com/app/docs/doc/816-5166/6mbb1kqig?a=view</a><br>man syslog.conf (4): <a href="http://docs.sun.com/app/docs/doc/816-5174/6mbb98uka?a=view">http://docs.sun.com/app/docs/doc/816-5174/6mbb98uka?a=view</a><br>
<br>In 'log', we read:<br><br>"log is a STREAMS software device driver that provides an interface for console<br>logging and for the STREAMS error logging and event tracing processes"<br><br>And in 'syslogd':<br>
<br>"If message ID generation is enabled (see log(7D)), each message will be preceded<br>by an identifier in the following format: [ID msgid facility.priority]. msgid<br>is the message's numeric identifier described in msgid(1M). facility and priority
<br>are described in syslog.conf(4). [ID 123456 kern.notice] is an example of an<br>identifier when message ID generation is enabled."<br><br>So you can configure logging through STREAMS ... but<br>AFAIK no-one ever bothered to polish STREAMS to a usable degree under Linux.
<br>And it is not used for syslogging.<br><br><br>A quick peek at the source for syslog and syslogd<br><br>(obtained through:<br>  up2date --get-source  sysklogd<br>  rpm --install /var/spool/up2date/sysklogd-1.4.1-26_EL.src.rpm
<br>  cd /usr/src/redhat/SOURCES/<br>  tar xzf sysklogd-1.4.1rh.tar.gz<br>  cd sysklogd-1.4.1rh<br>  vi syslog.c)<br><br>...reveals that the logging format is quite hardcoded.<br><br>In syslog ("the utility to log something"), the logging priority
<br>is written out at the start of the line, enclosed in < >, if<br>the message goes to the 'local logger' but not if it goes to a<br>file. The 'local logger' would be syslogd, and indeed in<br>syslogd.c, one sees that the <pri> value is stripped out and used
<br>to set the priority. After that, a lot of stuff happens to get<br>the message to where one wants it. But the priority is not included<br>in the final output.<br><br>So...if you absolutely need the priority, my best guess would be
<br>to modify syslogd.c to insert it in the output, then install your<br>modified syslog-daemon.<br><br>Best regards,<br><br>-- David<br><br><br><br></blockquote></div><br>