From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/5028 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: fmtmsg, syslog, and /dev/console Date: Fri, 2 May 2014 07:30:51 -0700 Message-ID: <20140502143050.GA513@muslin> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1399041049 8121 80.91.229.3 (2 May 2014 14:30:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 May 2014 14:30:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-5032-gllmg-musl=m.gmane.org@lists.openwall.com Fri May 02 16:30:42 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WgEU5-0007lv-0W for gllmg-musl@plane.gmane.org; Fri, 02 May 2014 16:30:41 +0200 Original-Received: (qmail 18250 invoked by uid 550); 2 May 2014 14:30:39 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 18239 invoked from network); 2 May 2014 14:30:39 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=YGl8+kOJeAlyoCCMY7OvOZiOdGP1oNecuzOaqD7H5a8=; b=GempnBT1jSWSgw/tqraBXOd4Url3MxpWrraNesVQqgJlxT6/uOBkBzuLcl92gQEBwF 3cU4TO304sKT/NJ3ukRjGKK7USBkbvz3z+oXLyFL5e2MdEG5jOVq7EuRMbjZ56aTMo1p brfHn5A6A8I3QYgd8tPrDyOruQ85PDiLkjlDUgJJv19COwNNWmVuwW0ICV8gD3aYDz26 o8U+ac0wf6YpdG+24m+zKZSTbsxk0EwgucULuiUKu99KmASTNJAGhqzTsbp9jnuJE76o Oo0Hahcjfn9KPsHuzEQz9xdV40cIESq0FObyQmTSpEwPSqVLCjH/3LWsx1Qfh68eemmD 5X2g== X-Received: by 10.66.124.137 with SMTP id mi9mr35168109pab.111.1399041026493; Fri, 02 May 2014 07:30:26 -0700 (PDT) Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:5028 Archived-At: Hello, As far as I can tell, the fmtmsg patch is waiting for comments due to the use of /dev/console; syslog() does not write to /dev/console, and Rich was asking about consistency. In other words, should both functions, neither, or only one write to /dev/console? I would argue that making syslog() not write to the system console is reasonable since the console is a peripheral fallback in case of the failure of the logging facility, but that fmtmsg() is intended to generate a message for reading immediately, which requires the ability to write to the system console. If stderr is redirected to a log (or if it's closed, as in a forking daemon), one would likely not have opportunity to read messages in a timely manner unless a log-watcher is installed. On the other side of things, if syslog() ends up not being able to log messages it usually means someone doesn't care about logs. --- The standard describes the two functions thus (current posix-manpages, corresponding to POSIX2013): The syslog() function shall send a message to an implementation-defined logging facility, which may log it in an implementation-defined system log, write it to the system console, forward it to a list of users, or forward it to the logging facility on another host over the network. The fmtmsg() function shall display messages in a specified format instead of the traditonal printf() function. Based on a message's classification component, fmtmsg() shall write a formatted message either to standard error, to the console, or to both. Thanks, Isaac Dunham