From owner-freebsd-doc Thu Sep 6 5:30:19 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 180EA37B40C for ; Thu, 6 Sep 2001 05:30:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f86CU1e75804; Thu, 6 Sep 2001 05:30:01 -0700 (PDT) (envelope-from gnats) Date: Thu, 6 Sep 2001 05:30:01 -0700 (PDT) Message-Id: <200109061230.f86CU1e75804@freefall.freebsd.org> To: freebsd-doc@freebsd.org Cc: From: SUGIMURA Takashi =?iso-2022-jp?B?GyRCP3lCPBsoQiAbJEI1LjtOGyhC?= Subject: Re: docs/30374: logger(1) manpage has wrong with default value of -p option Reply-To: SUGIMURA Takashi =?iso-2022-jp?B?GyRCP3lCPBsoQiAbJEI1LjtOGyhC?= Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR docs/30374; it has been noted by GNATS. From: SUGIMURA Takashi =?iso-2022-jp?B?GyRCP3lCPBsoQiAbJEI1LjtOGyhC?= To: freebsd-gnats-submit@freebsd.org Cc: ru@freebsd.org Subject: Re: docs/30374: logger(1) manpage has wrong with default value of -p option Date: Thu, 06 Sep 2001 21:25:45 +0900 I am very sad you've closed the PR. >> No, I tried many other facility and priority, then I know that >> (LOG_USER | LOG_NOTICE) is <13>. >> >Err. Is't impossible to generate a LOG_KERN using syslog(3). >Only kernel can generate these. > I see, but this problem is not concern about syslog(3). >LOG_KERN | LOG_NOTICE == LOG_NOTICE, as LOG_KERN is defined as (0<<3). Yes, I know, of course. LOG_NOTICE is decoded to <5>, so LOG_KERN | LOG_NOTICE is <5>, not <13>. 13 = (1<<3) | 5. >So if you call ``logger -p kern.notice'', that becomes as if it >were ``logger -p user.notice''. This is also documented in the >syslog(3) manpage: > Is it right? I say that about logger(1). Please see main() on /usr/src/usr.bin/logger/logger.c: ---------------- int main(argc, argv) int argc; char *argv[]; { int ch, logflags, pri; char *tag, *host, buf[1024]; tag = NULL; host = NULL; pri = LOG_NOTICE; logflags = 0; unsetenv("TZ"); while ((ch = getopt(argc, argv, "46Af:h:ip:st:")) != -1) (snip) ---------------- This shows the default value of variable "pri" is "LOG_NOTICE", it is not (LOG_USER | LOG_NOTICE) as you said. And, logger(1) don't use syslog(3) functions, simply send a UDP packet to the port 514. --- SUGIMURA Takashi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message