From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NkLz1-0004iQ-LO for qemu-devel@nongnu.org; Wed, 24 Feb 2010 13:29:15 -0500 Received: from [199.232.76.173] (port=57214 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NkLz0-0004h6-U1 for qemu-devel@nongnu.org; Wed, 24 Feb 2010 13:29:14 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NkLyx-0003Xx-Q1 for qemu-devel@nongnu.org; Wed, 24 Feb 2010 13:29:14 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:53866) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NkLyx-0003Xi-7U for qemu-devel@nongnu.org; Wed, 24 Feb 2010 13:29:11 -0500 Message-ID: <4B856FF2.3050703@mail.berlios.de> Date: Wed, 24 Feb 2010 19:29:06 +0100 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] Don't send local debug output to stdout References: <1262745591-28697-1-git-send-email-yamahata@valinux.co.jp> <20100106235113.GE29412@valinux.co.jp> <4B53363C.8060906@mail.berlios.de> <201002240228.31814.paul@codesourcery.com> In-Reply-To: <201002240228.31814.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org, Isaku Yamahata Paul Brook schrieb: >> I suggest these steps: >> >> 1. Debug output to stdout is no longer accepted for new / modified code. >> >> 2. New or modified debug messages should go to stderr. > > I don't see this as a real improvement. Arguably these aren't errors, so > stdout is where they should be going. > > If we're going to do anything sensible with debug output then we > should figure > out how to do it properly and consistently. Also remember that this isn't > supposed to be user friendly, it's for internal developer use only. > > Paul stdout is already used by curses or serial console output when QEMU is called with appropriate command line switches. If debugging output also goes to stdout, program output and debugging output are mixed which can make both completely unreadable. Just consider debug output from the serial driver (or any other device which works parallel to the normal program output). I was already confronted with this problem. My proposal is easy to implement and sufficient for internal developer use. It is not new: parts of QEMU already use stderr for debugging output. Of course better solutions exist, but they also need more efforts. Stefan