Date: Thu, 3 Sep 1998 00:36:14 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: archie@whistle.com (Archie Cobbs) Cc: tlambert@primenet.com, freebsd-hackers@FreeBSD.ORG Subject: Re: default syslog priority for kernel messages Message-ID: <199809030036.RAA00192@usr07.primenet.com> In-Reply-To: <199809020215.TAA00488@bubba.whistle.com> from "Archie Cobbs" at Sep 1, 98 07:15:31 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > > IMHO, printf() in the kernel should be deprecated in favor of log(). > > > > The only problem is that it's possible to printf from the kernel > > without logging, and it may frequently be desirable to send a message > > to the console without logging it. > > So then kill syslogd. > > Here is the comment in the code: > > /* > * Log writes to the log buffer, and guarantees not to sleep (so can be > * called by interrupt routines). If there is no process reading the > * log yet, it writes to the console also. > */ The printf calls are special-use calls. They are not merely the "printf" that you think should be "log". The "printf" is merely a wrapper for "kvprintf". Instead of putting "log" in those places, if you got rid of "printf", the correct thing to do would be to call "kvprintf" (not "log"). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809030036.RAA00192>