From owner-svn-src-head@FreeBSD.ORG Thu Nov 7 15:55:31 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 72CFF7D9; Thu, 7 Nov 2013 15:55:31 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-wi0-x22c.google.com (mail-wi0-x22c.google.com [IPv6:2a00:1450:400c:c05::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9602929A5; Thu, 7 Nov 2013 15:55:30 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id ez12so828980wid.17 for ; Thu, 07 Nov 2013 07:55:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=Z0DeF6Oq7mw8EzucTQsR4vLXo5tBiG1NnPq3dvszBWg=; b=VwYJUs5GFK4NN0pRF4GKkcLW1mMG3XYWdeGKy3mbGKhOIUvTEjNkqgi15W/c5DBT9F 0JeU3H3iajkrD3/csVQIr/YuznolqVVMfV26W21aunpoTrDpmK0miUfYWNOKYD7oJrOZ 5BAJaurilOTwPhZvYy7T/LHmRhLTiFXjtoXKiErxYDtwXuvO130gjA0i1KQ3qAnDJ1GA nO4RB8HfmiEIxjp5DehiCtMUbg0TSyCfrWj/IgoVhShCYJ41e2gfC984JyNu/fZiB85B uh4AXHaesTEgauS1NOmhNgq7ObRr7YEvkyvElcFVGCoYTDzqyCmYK3o6wPcReg9Vk1qJ DqrA== MIME-Version: 1.0 X-Received: by 10.194.176.163 with SMTP id cj3mr8074637wjc.8.1383839728960; Thu, 07 Nov 2013 07:55:28 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.171.35 with HTTP; Thu, 7 Nov 2013 07:55:28 -0800 (PST) In-Reply-To: <527B8357.5070200@FreeBSD.org> References: <201307012120.r61LKIxI059332@svn.freebsd.org> <527B8357.5070200@FreeBSD.org> Date: Thu, 7 Nov 2013 08:55:28 -0700 X-Google-Sender-Auth: 0CkAMZHgr10dBlzH0SUCRtyxlh8 Message-ID: Subject: Re: svn commit: r252481 - in head: etc sbin/devd From: Alan Somers To: Andriy Gapon Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Nov 2013 15:55:31 -0000 On Thu, Nov 7, 2013 at 5:11 AM, Andriy Gapon wrote: > > First, apologies for this very delayed reaction. > > on 02/07/2013 00:20 Alan Somers said the following: >> Author: asomers >> Date: Mon Jul 1 21:20:17 2013 >> New Revision: 252481 >> URL: http://svnweb.freebsd.org/changeset/base/252481 >> >> Log: >> Add syslog(3) support to devd(8). >> > [snip] >> @@ -243,8 +244,7 @@ bool >> action::do_action(config &c) >> { >> string s =3D c.expand_string(_cmd.c_str()); >> - if (Dflag) >> - fprintf(stderr, "Executing '%s'\n", s.c_str()); >> + devdlog(LOG_NOTICE, "Executing '%s'\n", s.c_str()); > > My opinion that this message does not deserve LOG_NOTICE message. > > LOG_NOTICE Conditions that are not error conditions, but should p= ossi=E2=80=90 > bly be handled specially. > > I don't think that devd reacting to an event deserves any special handlin= g from > an administrator. All LOG_NOTICE messages are logged into /var/log/messa= ges by > default. > Besides, many actions already explicitly call logger(1) and sometimes tha= t's the > only thing that they do. > > So on a system with default syslog configuration one can see messages lik= e: > devd: Executing 'logger Unknown USB device: vendor 0x03f0 product 0x102a = bus uhub7' > root: Unknown USB device: vendor 0x03f0 product 0x102a bus uhub7 > > I think that LOG_INFO should be fine for these messages. Yep, I agree. LOG_INFO should be fine. > >> my_system(s.c_str()); >> return (true); >> } > >> @@ -1078,10 +1090,27 @@ gensighand(int) >> romeo_must_die =3D 1; >> } >> >> +/* >> + * Local logging function. Prints to syslog if we're daemonized; syslo= g >> + * otherwise. >> + */ > > Minor nit: there is a typo in this comment. Oops. Would you like me to make these changes, or will you take care of it? -Alan