From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGqJs-0004s4-4U for qemu-devel@nongnu.org; Mon, 02 May 2011 06:25:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGqJq-00076g-Mp for qemu-devel@nongnu.org; Mon, 02 May 2011 06:25:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGqJq-00076T-Dr for qemu-devel@nongnu.org; Mon, 02 May 2011 06:25:34 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p42APXpa029233 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 May 2011 06:25:33 -0400 Received: from rincewind.home.kraxel.org (vpn2-9-136.ams2.redhat.com [10.36.9.136]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p42APU3G007185 for ; Mon, 2 May 2011 06:25:32 -0400 Message-ID: <4DBE869A.4010403@redhat.com> Date: Mon, 02 May 2011 12:25:30 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1303979358-4421-1-git-send-email-alevy@redhat.com> <1303979358-4421-4-git-send-email-alevy@redhat.com> <4DBAAA92.60409@redhat.com> <20110429221944.GD13837@amber.local> <4DBE731E.1050905@redhat.com> <20110502101200.GG17629@playa.redhat.com> In-Reply-To: <20110502101200.GG17629@playa.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] debug logging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, > dbg_print takes care of making it standard to have a loglevel and prefix, sounds > good, but I'd still like to know if it is acceptable to also redirect with -debug, > I guess reusing the DeviceState then, instead of my added struct, so just letting > DeviceState.debug_chardev == NULL by default, and settable with > -debug,id= Making dbg_print use DeviceState.debug_chardev (if present, stderr otherwise) looks sane to me. Buf I'd use standard properties then to set it instead of a separate -debug switch, i.e. -chardev file,id=messages,path=... \ -device foo,dbg=1,dbglog=messages cheers, Gerd