From owner-freebsd-current@FreeBSD.ORG Fri Mar 27 13:06:40 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56D5E2EE for ; Fri, 27 Mar 2015 13:06:40 +0000 (UTC) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 3957FEF9 for ; Fri, 27 Mar 2015 13:06:40 +0000 (UTC) Received: from marvin.lab.vangyzen.net (c-73-147-253-17.hsd1.va.comcast.net [73.147.253.17]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 9864656467; Fri, 27 Mar 2015 08:06:33 -0500 (CDT) Message-ID: <55155594.3000201@FreeBSD.org> Date: Fri, 27 Mar 2015 09:05:24 -0400 From: Eric van Gyzen User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Eric Badger , freebsd-current@freebsd.org Subject: Re: Early use of log() does not end up in kernel msg buffer References: <5514CC6D.3020607@badgerio.us> In-Reply-To: <5514CC6D.3020607@badgerio.us> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Mar 2015 13:06:40 -0000 On 03/26/2015 23:20, Eric Badger wrote: > Using log(9) when no process is reading the log results in the message > going only to the console (contrast with printf(9), which goes to the > console and to the kernel message buffer in this case). I believe it is > truer to the semantics of logging for messages to *always* go to the > message buffer (where they can eventually be collected and in fact put > into a logfile). I therefore propose the attached patch, which sends > log(9) to the message buffer always, and to the console only if no one > has yet opened the log. This makes sense to me. Since I'm new here, I'll wait for others to comment. Eric