Received: from eggs.gnu.org ([2001:4830:134:3::10]:40088) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqq6-0000sI-GN for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:41:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zoqq3-0002zS-3W for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:41:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40917) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zoqq2-0002zO-Ua for qemu-devel@nongnu.org; Wed, 21 Oct 2015 06:41:47 -0400 Date: Wed, 21 Oct 2015 11:41:44 +0100 From: Stefan Hajnoczi Message-ID: <20151021104144.GC13408@stefanha-thinkpad.redhat.com> References: <1444894224-9542-1-git-send-email-den@openvz.org> <1444894224-9542-3-git-send-email-den@openvz.org> <87oafzdmck.fsf_-_@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87oafzdmck.fsf_-_@blackfin.pond.sub.org> Subject: Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Peter Maydell , Pavel Butsykin , qemu-devel@nongnu.org, Luiz Capitulino , "Denis V. Lunev" Two useful aspects for observability: 1. Logging Error messages, rate-limited warnings, and important troubleshooting information for users. Audience: Users, system administrators, developers 2. Tracing Internal state changes and events for performance analysis. Audience: Developers DPRINTF() falls under both #1 and #2. Care needs to be taken to separate the logging from the tracing when converting DPRINTF(). Side note: we don't have effect "once only" or rate-limiting built into error_report(). Guest-triggerable errors or warnings should be limited to prevent log flooding. It would be nice to unify TCG's "qemu log" and error_report() into a single logging mechanism that is thread-safe and has rate-limiting. Stefan