From owner-freebsd-hackers Wed Sep 2 17:37:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id RAA08521 for freebsd-hackers-outgoing; Wed, 2 Sep 1998 17:37:36 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id RAA08512 for ; Wed, 2 Sep 1998 17:37:33 -0700 (PDT) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id RAA24361; Wed, 2 Sep 1998 17:36:25 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp03.primenet.com, id smtpd024335; Wed Sep 2 17:36:17 1998 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id RAA00192; Wed, 2 Sep 1998 17:36:14 -0700 (MST) From: Terry Lambert Message-Id: <199809030036.RAA00192@usr07.primenet.com> Subject: Re: default syslog priority for kernel messages To: archie@whistle.com (Archie Cobbs) Date: Thu, 3 Sep 1998 00:36:14 +0000 (GMT) Cc: tlambert@primenet.com, freebsd-hackers@FreeBSD.ORG In-Reply-To: <199809020215.TAA00488@bubba.whistle.com> from "Archie Cobbs" at Sep 1, 98 07:15:31 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > 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