On Thu, Nov 7, 2013 at 5:11 AM, Andriy Gapon <a...@freebsd.org> 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 = 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 possiā > bly be handled specially. > > I don't think that devd reacting to an event deserves any special handling > from > an administrator. All LOG_NOTICE messages are logged into /var/log/messages > by > default. > Besides, many actions already explicitly call logger(1) and sometimes that's > the > only thing that they do. > > So on a system with default syslog configuration one can see messages like: > 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 = 1; >> } >> >> +/* >> + * Local logging function. Prints to syslog if we're daemonized; syslog >> + * 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 _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"