Subject: port-i386/2964: Syslogd output confusing
To: None <gnats-bugs@gnats.netbsd.org, darcy@druid.com>
From: None <darcy@druid.com>
List: netbsd-bugs
Date: 11/26/1996 07:29:23
>Number: 2964
>Category: port-i386
>Synopsis: Syslogd output has confusing mixed number bases
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Nov 26 04:35:02 1996
>Last-Modified:
>Originator: D'Arcy J.M. Cain
>Organization:
D'Arcy J.M. Cain | Democracy is three wolves
darcy@{druid.com|vex.net} | and a sheep voting on
+1 416 943 5281 (DoD#0082) (eNTP) | what's for dinner.
-- http://www.druid.com/darcy --
>Release: NetBSD-current
>Environment:
System: NetBSD druid.com 1.2B NetBSD 1.2B (DRUID) #0: Sun Nov 24 10:11:21 EST 1996 darcy@druid.com:/usr/src/sys/arch/i386/compile/DRUID i386
>Description:
The output from syslogd displays the priority in octal, the flags in decimal
and puts nothing to indicate the number base. This can be very confusing
until you discover it.
>How-To-Repeat:
Look at debug output of syslogd.
>Fix:
The following changes both to hex preceded by "0x" to make the number
base obvious.
*** ../src.original/./usr.sbin/syslogd/syslogd.c Mon Nov 18 18:01:15 1996
--- ./usr.sbin/syslogd/syslogd.c Fri Feb 9 07:03:21 1996
***************
*** 482,488 ****
int fac, msglen, omask, prilev;
char *timestamp;
! dprintf("logmsg: pri %o, flags %x, from %s, msg %s\n",
pri, flags, from, msg);
omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));
--- 482,488 ----
int fac, msglen, omask, prilev;
char *timestamp;
! dprintf("logmsg: pri 0x%02x, flags 0x%02x, from %s, msg %s\n",
pri, flags, from, msg);
omask = sigblock(sigmask(SIGHUP)|sigmask(SIGALRM));
>Audit-Trail:
>Unformatted: