From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGqRP-00071E-UO for qemu-devel@nongnu.org; Mon, 02 May 2011 06:33:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGqRO-0008CM-Gp for qemu-devel@nongnu.org; Mon, 02 May 2011 06:33:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64863) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGqRO-0008C4-7B for qemu-devel@nongnu.org; Mon, 02 May 2011 06:33:22 -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 p42AXKfh020644 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 2 May 2011 06:33:21 -0400 Date: Mon, 2 May 2011 13:33:15 +0300 From: Alon Levy Message-ID: <20110502103315.GA3633@playa.tlv.redhat.com> 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> <4DBE869A.4010403@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4DBE869A.4010403@redhat.com> Subject: Re: [Qemu-devel] debug logging List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org On Mon, May 02, 2011 at 12:25:30PM +0200, Gerd Hoffmann wrote: > 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 > Sounds good. I'll try to make it so. > cheers, > Gerd >