[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
lib/43300: syslog(3): LOG_PID inconsistency
>Synopsis: syslog(3): LOG_PID inconsistency
>Arrival-Date: Thu May 13 14:20:00 +0000 2010
>Originator: Takahiro Kambe
>Release: NetBSD 5.99.29
System: NetBSD edge.back-street.net 5.99.29 NetBSD 5.99.29 (VMWARE-F3-MONO)
#11: Fri May 7 15:16:09 JST 2010
syslog(3) was updated to support RFC5424 and syslog(3)'s behavior
was changed when LOG_PERROR was specified. And description about
LOG_PID isn't match with current behavior.
Here is sample program.
main(int argc, char **argv)
openlog("test", LOG_PID | LOG_PERROR, LOG_DAEMON);
syslog(LOG_DEBUG, "This is a test message.");
On NetBSD 5.1_RC1:
test: This is a test message.
On NetBSD 5.99.29:
test 27496 - - This is a test message.
I think latter refrects syslog message format of RFC5424. But at
the same time, syslog(3) says
LOG_PID Log the process id with each message: useful for identify-
ing instantiations of daemons. (This PID is placed within
brackets between the ident and the message.)
It is correct for the effect of LOG_PID to a log file of syslogd(8)
but not for output by LOG_PERROR.
Fix documentation of syslog(3) or make syslog(3) to output as
test - - This is a test message.
test: - - This is a test message.
Main Index |
Thread Index |